{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; }; }; }