nixfiles/hosts/hetzner-vm/services/restic.nix
2022-01-10 20:52:18 +00:00

31 lines
753 B
Nix

{ ... }:
let
backupUser = "root";
backupPaths = [
"/var/lib/postgresql"
"/var/lib/vault"
"/var/lib/acme"
];
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";
};
}