2023-08-31 01:55:45 +03:00
|
|
|
{ depot, ... }:
|
2021-10-16 21:22:48 +03:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./imap.nix
|
|
|
|
./opendkim.nix
|
|
|
|
./postfix.nix
|
|
|
|
];
|
2023-08-31 01:55:45 +03:00
|
|
|
services.nginx.virtualHosts."mail.${depot.lib.meta.domain}" = {
|
2021-10-16 21:22:48 +03:00
|
|
|
enableACME = true;
|
|
|
|
locations."/".return = "204";
|
|
|
|
};
|
2023-08-31 01:55:45 +03:00
|
|
|
security.acme.certs."mail.${depot.lib.meta.domain}".extraDomainNames = map
|
|
|
|
(x: "${x}.${depot.lib.meta.domain}") [
|
2021-10-16 21:22:48 +03:00
|
|
|
"mx"
|
|
|
|
"imap"
|
|
|
|
"smtp"
|
|
|
|
];
|
|
|
|
}
|