nixos/hosts/architect/backup.nix
2021-08-07 13:38:18 +02:00

24 lines
548 B
Nix

{config, lib, ...} :
{
services.restic.backups = {
backblaze = {
initialize = true;
passwordFile = "/secrets/restic/data.key";
s3CredentialsFile = "/secrets/restic/credentials.txt";
repository = "b2:architect:/";
paths = [ "/var/lib" "/secrets" ];
pruneOpts = [
"--keep-daily 45"
"--keep-weekly 12"
"--keep-monthly 12"
"--keep-yearly 3"
];
timerConfig = {
OnCalendar = "monday 00:05";
RandomizedDelaySec = "2h";
};
};
};
}