2023-11-10 03:10:06 +00:00
|
|
|
{ config, ... }:
|
2021-11-15 10:02:05 +00:00
|
|
|
let
|
2023-11-16 00:00:11 +00:00
|
|
|
cfg = config.selfprivacy;
|
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
|
|
|
};
|
|
|
|
}
|