feat: add dns.useStagingACME option

Used for testing environments, so we don't stumble upon ACME rate limits.
This commit is contained in:
Inex Code
2022-11-16 11:02:20 +03:00
parent 895a816ef5
commit 3dd8ff1821
3 changed files with 9 additions and 1 deletions

View File

@@ -8,7 +8,10 @@ in
};
security.acme = {
acceptTerms = true;
email = "${cfg.username}@${cfg.domain}";
defaults = {
email = "${cfg.username}@${cfg.domain}";
server = if cfg.dns.useStagingACME then "https://acme-staging-v02.api.letsencrypt.org/directory" else "https://acme-v02.api.letsencrypt.org/directory";
};
certs = lib.mkForce {
"${cfg.domain}" = {
domain = "*.${cfg.domain}";