selfprivacy-nixos-config/backup/restic.nix

30 lines
574 B
Nix
Raw Permalink Normal View History

2021-11-15 10:02:05 +00:00
{ config, pkgs, ... }:
let
cfg = config.services.userdata;
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
};
}