mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-09 10:03:12 +00:00
80ba7d0bda
+ simple-nixos-mailserver as an SP module
30 lines
571 B
Nix
30 lines
571 B
Nix
{ config, ... }:
|
|
let
|
|
cfg = config.selfprivacy.userdata;
|
|
in
|
|
{
|
|
services.restic.backups = {
|
|
options = {
|
|
passwordFile = "/etc/restic/resticPasswd";
|
|
repository = "s3:s3.anazonaws.com/${cfg.backup.bucket}";
|
|
initialize = true;
|
|
paths = [
|
|
"/var/dkim"
|
|
"/var/vmail"
|
|
];
|
|
timerConfig = {
|
|
OnCalendar = [ "daily" ];
|
|
};
|
|
user = "restic";
|
|
pruneOpts = [
|
|
"--keep-daily 5"
|
|
];
|
|
};
|
|
};
|
|
users.users.restic = {
|
|
isNormalUser = false;
|
|
isSystemUser = true;
|
|
group = "restic";
|
|
};
|
|
}
|