nixfiles/hosts/hetzner-vm/services/restic.nix

27 lines
719 B
Nix
Raw Normal View History

2022-02-10 10:37:09 +00:00
_:
2021-12-31 12:53:52 +00:00
let
2021-12-31 12:40:11 +00:00
backupUser = "root";
2022-01-16 11:22:44 +00:00
backupPaths = [ "/var/lib/postgresql" "/var/lib/vault" "/var/lib/acme" ];
2021-12-31 12:53:52 +00:00
timerConfig = {
OnBootSec = "1m";
OnCalendar = "daily";
};
2021-12-31 12:40:11 +00:00
in {
services.restic.backups.hetzner-vm = {
user = backupUser;
paths = backupPaths;
2022-02-10 10:37:09 +00:00
inherit timerConfig;
2021-12-29 18:33:04 +00:00
repository = "b2:Backups-HetznerVM:/";
2021-12-29 13:17:01 +00:00
passwordFile = "/secrets/restic-password";
environmentFile = "/secrets/restic-env";
};
2021-12-31 12:40:11 +00:00
services.restic.backups.cassie-hetzner-vm = {
user = backupUser;
paths = backupPaths;
2022-02-10 10:37:09 +00:00
inherit timerConfig;
2021-12-31 12:40:11 +00:00
repository = "b2:Cryptidz-Backup:HetznerVM";
passwordFile = "/secrets/restic-password-cassie";
environmentFile = "/secrets/restic-env-cassie";
};
2021-12-29 13:17:01 +00:00
}