feat: use one acme host for the whole domain

This commit is contained in:
2026-06-02 12:54:17 +02:00
parent 17e85e83b9
commit 0f39cfdf32
2 changed files with 23 additions and 5 deletions
+19
View File
@@ -50,4 +50,23 @@
AllowUsers = [ "leonhard" ]; AllowUsers = [ "leonhard" ];
}; };
}; };
security.acme = {
acceptTerms = true;
defaults.email = "admin@${config.kekleo.domain}";
defaults.webroot = "/var/lib/acme/acme-challenge/";
certs.${config.kekleo.domain} = {
group = config.services.nginx.group;
};
};
services.nginx = {
enable = true;
virtualHosts.${config.kekleo.domain} = {
forceSSL = true;
useACMEHost = config.kekleo.domain;
locations."/.well-known/".root = config.security.acme.defaults.webroot;
};
};
} }
+4 -5
View File
@@ -20,17 +20,16 @@ in
}; };
}; };
security.acme = { security.acme.certs.${domain}.extraDomainNames = [
acceptTerms = true; vaultDomain
defaults.email = "admin@${domain}"; ];
};
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${vaultDomain} = { virtualHosts.${vaultDomain} = {
forceSSL = true; forceSSL = true;
enableACME = true; useACMEHost = config.kekleo.domain;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}"; proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
proxyWebsockets = true; proxyWebsockets = true;