selfprivacy-nixos-config/backup/restic.nix

30 lines
571 B
Nix
Raw Normal View History

{ config, ... }:
2021-11-15 10:02:05 +00:00
let
cfg = config.selfprivacy.userdata;
2021-11-15 10:02:05 +00:00
in
{
services.restic.backups = {
options = {
passwordFile = "/etc/restic/resticPasswd";
2022-11-07 23:49:12 +00:00
repository = "s3:s3.anazonaws.com/${cfg.backup.bucket}";
2021-11-15 10:02:05 +00:00
initialize = true;
paths = [
"/var/dkim"
"/var/vmail"
];
timerConfig = {
OnCalendar = [ "daily" ];
};
user = "restic";
pruneOpts = [
"--keep-daily 5"
];
};
};
users.users.restic = {
isNormalUser = false;
isSystemUser = true;
2022-04-20 10:22:16 +00:00
group = "restic";
2021-11-15 10:02:05 +00:00
};
}