2023-06-11 00:04:15 -04:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-15 02:28:23 -05:00
|
|
|
sops.secrets.restic-ame = {
|
|
|
|
sopsFile = ../../../secrets/restic/secrets.yaml;
|
|
|
|
};
|
2023-06-11 00:04:15 -04:00
|
|
|
environment.systemPackages = [pkgs.restic];
|
|
|
|
services.restic = {
|
|
|
|
backups = {
|
|
|
|
ame = {
|
|
|
|
paths = [
|
|
|
|
"/home"
|
|
|
|
];
|
|
|
|
exclude = [
|
|
|
|
"*.qcow2"
|
|
|
|
"*.iso"
|
|
|
|
"/home/*/Downloads"
|
|
|
|
"/home/*/Videos"
|
|
|
|
"/home/*/.cache"
|
|
|
|
"/home/*/.rustup"
|
|
|
|
"/home/*/.cargo"
|
|
|
|
"/home/*/.mplayer"
|
|
|
|
"/home/*/.local/share/Trash"
|
|
|
|
"/home/*/.local/share/.var"
|
|
|
|
];
|
|
|
|
pruneOpts = [
|
|
|
|
"--keep-daily=4"
|
|
|
|
"--keep-weekly=3"
|
|
|
|
"--keep-monthly=2"
|
|
|
|
];
|
|
|
|
initialize = true;
|
2024-01-15 02:28:23 -05:00
|
|
|
repository = "/nas/restic";
|
|
|
|
passwordFile = config.sops.secrets.restic-ame.path;
|
2023-06-11 00:04:15 -04:00
|
|
|
timerConfig = {
|
|
|
|
OnCalendar = "daily";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|