2023-06-13 12:11:08 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
sops.secrets.restic-repo-pwd = {};
|
|
|
|
environment.systemPackages = [pkgs.restic];
|
|
|
|
services.restic = {
|
|
|
|
backups = {
|
2023-06-14 07:23:19 -04:00
|
|
|
yuki = {
|
2023-06-13 12:11:08 -04:00
|
|
|
paths = [
|
|
|
|
"/home"
|
|
|
|
];
|
|
|
|
exclude = [
|
|
|
|
"*.qcow2"
|
|
|
|
"*.iso"
|
|
|
|
"/home/*/Downloads"
|
|
|
|
"/home/*/.cache"
|
|
|
|
"/home/*/.local/share/Trash"
|
|
|
|
"/home/*/.local/share/.var"
|
|
|
|
];
|
|
|
|
pruneOpts = [
|
|
|
|
"--keep-daily=4"
|
|
|
|
"--keep-weekly=3"
|
|
|
|
"--keep-monthly=2"
|
|
|
|
];
|
|
|
|
initialize = true;
|
|
|
|
repository = "/nas/home";
|
|
|
|
passwordFile = config.sops.secrets.restic-repo-pwd.path;
|
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|