nixos-config/linux/singularity/mailserver.nix

25 lines
476 B
Nix
Raw Normal View History

2023-10-09 10:44:07 -07:00
{ config, ... }:
let
dn = config.constants.domain;
usr = config.constants.userName;
mailSecret = "mail/${usr}/password";
in
{
2023-12-06 21:46:16 -08:00
mailserver = {
enable = true;
fqdn = "mail.${dn}";
domains = [ dn ];
2023-10-09 10:44:07 -07:00
2023-12-06 21:46:16 -08:00
loginAccounts = {
"${usr}@${dn}" = {
aliases = [ config.constants.postMaster ];
hashedPasswordFile = config.sops.secrets.${mailSecret}.path;
2023-10-09 10:44:07 -07:00
};
};
2023-12-06 21:46:16 -08:00
certificateScheme = "acme";
};
2023-10-09 10:44:07 -07:00
sops.secrets.${mailSecret} = { };
}