mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 11:41:26 +00:00
fix: Split wildcard and root domains for ACME (#98)
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config/pulls/98
This commit is contained in:
parent
30e4f0a2cc
commit
46bb08581b
|
@ -33,13 +33,17 @@ in
|
|||
certs = {
|
||||
"${cfg.domain}" = {
|
||||
domain = "*.${cfg.domain}";
|
||||
extraDomainNames = [ "${cfg.domain}" ];
|
||||
group = "acmereceivers";
|
||||
dnsProvider = lib.strings.toLower cfg.dns.provider;
|
||||
credentialsFile = acme-env-filepath;
|
||||
dnsPropagationCheck =
|
||||
! (lib.elem cfg.dns.provider dnsPropagationCheckExceptions);
|
||||
};
|
||||
"root-${cfg.domain}" = {
|
||||
domain = cfg.domain;
|
||||
group = "acmereceivers";
|
||||
webroot = "/var/lib/acme/acme-challenge";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services.acme-secrets = {
|
||||
|
|
|
@ -21,7 +21,7 @@ in
|
|||
'';
|
||||
virtualHosts = {
|
||||
"${domain}" = {
|
||||
useACMEHost = domain;
|
||||
useACMEHost = "root-${domain}";
|
||||
forceSSL = true;
|
||||
extraConfig = ''
|
||||
add_header Strict-Transport-Security $hsts_header;
|
||||
|
|
Loading…
Reference in a new issue