mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 13:23:11 +01:00
30 lines
495 B
Nix
30 lines
495 B
Nix
{ config, ... }:
|
|
let
|
|
domain = "mail.${config.networking.domain}";
|
|
in
|
|
{
|
|
imports = [
|
|
./postfix.nix
|
|
./dovecot2.nix
|
|
./rspamd.nix
|
|
];
|
|
security.acme.certs."${domain}" = {
|
|
reloadServices = [
|
|
"postfix.service"
|
|
"dovecot2.service"
|
|
];
|
|
};
|
|
|
|
services.nginx.virtualHosts = {
|
|
"${domain}" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
};
|
|
"jmap.${domain}" = {
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:5000";
|
|
};
|
|
};
|
|
};
|
|
}
|