nixos-config/linux/singularity/mailserver.nix

22 lines
468 B
Nix
Raw Normal View History

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