nixos/config/hosts/capetillo/services/restic.nix

18 lines
571 B
Nix
Raw Normal View History

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