2024-08-31 21:13:43 -07:00
|
|
|
{config, ...}:
|
|
|
|
|
with config.constants; let
|
|
|
|
|
mailSecret = "mail/${userName}/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 = {
|
2024-08-31 21:13:43 -07:00
|
|
|
"${userName}@${domain}" = {
|
|
|
|
|
aliases = [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
|
|
|
}
|