snowflake/hosts/ame/services/restic.nix
notohh 31dbabf592
All checks were successful
flake check / check (push) Successful in 4m34s
fmt check / check (push) Successful in 1m7s
ame: update restic
2024-01-15 02:28:23 -05:00

42 lines
908 B
Nix

{
pkgs,
config,
...
}: {
sops.secrets.restic-ame = {
sopsFile = ../../../secrets/restic/secrets.yaml;
};
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;
repository = "/nas/restic";
passwordFile = config.sops.secrets.restic-ame.path;
timerConfig = {
OnCalendar = "daily";
};
};
};
};
}