This commit is contained in:
Till 2025-12-15 18:19:39 +01:00
parent ad5ba0eb46
commit d564bd5d0f
3 changed files with 11 additions and 1 deletions

View file

@ -11,6 +11,7 @@
recommendedTlsSettings = true;
virtualHosts = {
"${config.networking.domain}" = {
onlySSL = true;
useACMEHost = config.networking.domain;
@ -21,6 +22,7 @@
'';
};
};
"${config.networking.fqdn}-80" = {
serverAliases = [
"*.ktiu.net"
@ -33,6 +35,7 @@
return = "301 https://$host$request_uri";
};
};
"${config.networking.fqdn}" = {
onlySSL = true;
useACMEHost = config.networking.domain;
@ -40,6 +43,7 @@
return = "404";
};
};
};
};

View file

@ -14,7 +14,7 @@ in
];
services.nginx.virtualHosts."${srv.DOMAIN}" = {
forceSSL = true;
onlySSL = true;
useACMEHost = config.networking.domain;
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
extraConfig = ''

View file

@ -7,4 +7,10 @@
./dovecot.nix
./roundcube.nix
];
security.acme.certs."${config.networking.domain}".reloadServices = [
"nginx"
"dovecot2"
"postfix"
];
}