38 lines
906 B
Nix
38 lines
906 B
Nix
_:
|
|
let
|
|
|
|
mail_config = (import ./mailserver/config.nix { });
|
|
|
|
backupUser = "root";
|
|
backupPaths = [
|
|
"/var/lib/postgresql"
|
|
"/var/lib/vault"
|
|
"/var/lib/acme"
|
|
"/secrets"
|
|
mail_config.vmail_config.directory
|
|
mail_config.sieve_directory
|
|
mail_config.dkim_directory
|
|
];
|
|
timerConfig = {
|
|
OnBootSec = "1m";
|
|
OnCalendar = "daily";
|
|
};
|
|
in {
|
|
services.restic.backups.hetzner-vm = {
|
|
user = backupUser;
|
|
paths = backupPaths;
|
|
inherit timerConfig;
|
|
repository = "b2:Backups-HetznerVM:/";
|
|
passwordFile = "/secrets/restic-password";
|
|
environmentFile = "/secrets/restic-env";
|
|
};
|
|
services.restic.backups.cassie-hetzner-vm = {
|
|
user = backupUser;
|
|
paths = backupPaths;
|
|
inherit timerConfig;
|
|
repository = "b2:Cryptidz-Backup:HetznerVM";
|
|
passwordFile = "/secrets/restic-password-cassie";
|
|
environmentFile = "/secrets/restic-env-cassie";
|
|
};
|
|
}
|