split!
This commit is contained in:
parent
68704bc88e
commit
b9c6c1da6a
25 changed files with 87 additions and 6 deletions
39
services/distrust/mailserver.nix
Normal file
39
services/distrust/mailserver.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{config, ...}: {
|
||||
age.secrets."bind_pw".file = ../secrets/bind_pw;
|
||||
|
||||
mailserver = {
|
||||
stateVersion = 3;
|
||||
enable = true;
|
||||
fqdn = "distrust.network";
|
||||
domains = ["distrust.network"];
|
||||
certificateScheme = "acme";
|
||||
ldap = {
|
||||
enable = true;
|
||||
bind.dn = "cn=bind,ou=people,dc=distrust,dc=network";
|
||||
bind.passwordFile = config.age.secrets."bind_pw".path;
|
||||
searchBase = "ou=people,dc=distrust,dc=network";
|
||||
uris = ["ldap://localhost:3890"];
|
||||
};
|
||||
};
|
||||
|
||||
services.borgbackup.jobs."mailserver" = {
|
||||
repo = config.distrust.backups.borgRepository + "/./mailserver";
|
||||
environment = {
|
||||
BORG_RSH = "ssh -i ${config.distrust.backups.borgSSHKey} -o 'StrictHostKeyChecking=no'";
|
||||
};
|
||||
paths = [
|
||||
"/var/vmail/ldap"
|
||||
];
|
||||
encryption = {
|
||||
mode = "keyfile";
|
||||
passCommand = config.distrust.backups.borgPassCommand;
|
||||
};
|
||||
compression = "auto,lzma";
|
||||
startAt = "daily";
|
||||
prune.keep = {
|
||||
daily = 7;
|
||||
weekly = 4;
|
||||
monthly = -1;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue