feat: use one acme host for the whole domain
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user