nixos-config/linux/singularity/mailserver.nix

27 lines
669 B
Nix
Raw Normal View History

2024-08-31 21:13:43 -07:00
{config, ...}:
with config.constants; let
2024-12-14 22:41:34 -08:00
userSecret = "mail/${userName}/password";
vaultwardenSecret = "mail/vaultwarden/password";
2024-08-14 11:14:20 -07:00
in {
2023-12-06 21:46:16 -08:00
mailserver = {
enable = true;
2024-08-31 21:13:43 -07:00
fqdn = "mail.${domain}";
domains = [domain];
2023-10-09 10:44:07 -07:00
2023-12-06 21:46:16 -08:00
loginAccounts = {
2025-06-24 00:33:08 -05:00
"${postMaster}" = {
aliases = ["trivial@${domain}"];
2024-12-14 22:41:34 -08:00
hashedPasswordFile = config.sops.secrets.${userSecret}.path;
2023-10-09 10:44:07 -07:00
};
2024-12-14 22:41:34 -08:00
${config.services.vaultwarden.config.SMTP_FROM}.hashedPasswordFile = config.sops.secrets.${vaultwardenSecret}.path;
2023-10-09 10:44:07 -07:00
};
2023-12-06 21:46:16 -08:00
certificateScheme = "acme";
2025-06-23 23:46:32 -05:00
stateVersion = 3;
2023-12-06 21:46:16 -08:00
};
2024-12-14 22:41:34 -08:00
sops.secrets = {
${userSecret} = {};
${vaultwardenSecret} = {};
};
2023-10-09 10:44:07 -07:00
}