nixos/hosts/architect/backup.nix

24 lines
548 B
Nix
Raw Normal View History

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