This commit is contained in:
Bryan Ramos 2026-03-13 17:43:08 -04:00
parent 851a198428
commit 0a90e2f7b2
Signed by: bryan
GPG key ID: 6ABDCD144D6643C8
2 changed files with 21 additions and 2 deletions

View file

@ -54,9 +54,20 @@ in
};
};
services.sslh = {
enable = true;
settings = {
listen = [{ host = "0.0.0.0"; port = 443; }];
protocols = [
{ name = "ssh"; host = "127.0.0.1"; port = 22; probe = "builtin"; }
{ name = "tls"; host = "127.0.0.1"; port = 4443; probe = "builtin"; }
];
};
};
services.nginx = {
enable = true;
virtualHosts =
virtualHosts =
let
certPath = config.security.acme.certs."ramos.codes".directory;
sslCertificate = "${certPath}/fullchain.pem";
@ -64,6 +75,10 @@ in
withSSL = hosts: mapAttrs (name: hostConfig: hostConfig // {
inherit sslCertificate sslCertificateKey;
listen = [
{ addr = "127.0.0.1"; port = 4443; ssl = true; }
{ addr = "0.0.0.0"; port = 80; }
];
forceSSL = true;
}) hosts;