nix-deploy/stable/config/hosts/mail/services/restic.nix

18 lines
585 B
Nix
Raw Normal View History

2021-09-22 10:16:11 +02:00
{ config, ... }:
{
services.restic.backups = {
2021-11-23 15:29:23 +01:00
"mail" = {
paths = [ "/var/vmail" ];
repository = "sftp:restic@despondos.nao.sh:/etheria/backup/mail/mail";
2021-09-22 10:16:11 +02:00
initialize = true;
pruneOpts = [ "--keep-daily 7" "--keep-weekly 5" "--keep-monthly 12" "--keep-yearly 75" ];
timerConfig = { "OnCalendar" = "02:15"; };
2021-09-23 16:45:06 +02:00
extraOptions = [ "sftp.command='ssh restic@despondos.nao.sh -i ${config.secrets.files.ssh_key.file} -s sftp'" ];
2021-09-22 10:16:11 +02:00
passwordFile = builtins.toString config.secrets.files.restic_pass.file;
2021-11-23 15:29:23 +01:00
user = "virtualMail";
2021-09-22 15:31:20 +02:00
};
2021-09-22 10:16:11 +02:00
};
}