nixos/hosts/architect/backup.nix

24 lines
549 B
Nix
Raw Permalink Normal View History

2021-11-25 11:42:32 +00:00
{ config, lib, ... }:
2021-07-03 23:43:52 +01:00
{
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";
2022-02-15 11:03:05 +00:00
environmentFile = "/secrets/restic/credentials.txt";
2021-11-25 11:42:32 +00:00
repository = "b2:architect:/";
2022-10-11 20:29:41 +01:00
paths = [ "/var/lib" "/secrets" "/services" ];
2021-11-25 11:42:32 +00:00
pruneOpts = [
2021-07-03 23:43:52 +01:00
"--keep-daily 45"
"--keep-weekly 12"
"--keep-monthly 12"
"--keep-yearly 3"
];
timerConfig = {
2022-04-05 13:05:08 +01:00
OnCalendar = "monday 03:00";
RandomizedDelaySec = "1h";
2021-07-03 23:43:52 +01:00
};
};
};
}