diff --git a/hosts/hetzner-vm/services/restic.nix b/hosts/hetzner-vm/services/restic.nix index 2f29595..42ff236 100644 --- a/hosts/hetzner-vm/services/restic.nix +++ b/hosts/hetzner-vm/services/restic.nix @@ -1,13 +1,28 @@ -{ ... }: { - services.restic.backups.hetzner-vm = { - user = "root"; - paths = [ "/var/lib/postgresql" "/var/lib/vault" ]; - timerConfig = { +{ ... }: +let + backupUser = "root"; + backupPaths = [ + "/var/lib/postgresql" "/var/lib/vault" + ]; + timerConfig = { OnBootSec = "1m"; OnCalendar = "daily"; }; +in { + services.restic.backups.hetzner-vm = { + user = backupUser; + paths = backupPaths; + timerConfig = timerConfig; repository = "b2:Backups-HetznerVM:/"; passwordFile = "/secrets/restic-password"; environmentFile = "/secrets/restic-env"; }; + services.restic.backups.cassie-hetzner-vm = { + user = backupUser; + paths = backupPaths; + timerConfig = timerConfig; + repository = "b2:Cryptidz-Backup:HetznerVM"; + passwordFile = "/secrets/restic-password-cassie"; + environmentFile = "/secrets/restic-env-cassie"; + }; }