mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 03:41:26 +00:00
feat: add dns.useStagingACME option
Used for testing environments, so we don't stumble upon ACME rate limits.
This commit is contained in:
parent
895a816ef5
commit
3dd8ff1821
|
@ -8,7 +8,10 @@ in
|
||||||
};
|
};
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
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 {
|
certs = lib.mkForce {
|
||||||
"${cfg.domain}" = {
|
"${cfg.domain}" = {
|
||||||
domain = "*.${cfg.domain}";
|
domain = "*.${cfg.domain}";
|
||||||
|
|
|
@ -90,6 +90,10 @@ in
|
||||||
description = "DNS provider that was defined at the initial setup process. Default is ClOUDFLARE";
|
description = "DNS provider that was defined at the initial setup process. Default is ClOUDFLARE";
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
};
|
};
|
||||||
|
useStagingACME = mkOption {
|
||||||
|
description = "Use staging ACME server. Default is false";
|
||||||
|
type = types.nullOr types.bool;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
backup = {
|
backup = {
|
||||||
bucket = mkOption {
|
bucket = mkOption {
|
||||||
|
|
|
@ -20,6 +20,7 @@ in
|
||||||
};
|
};
|
||||||
dns = {
|
dns = {
|
||||||
provider = lib.attrsets.attrByPath [ "dns" "provider" ] "CLOUDFLARE" jsonData;
|
provider = lib.attrsets.attrByPath [ "dns" "provider" ] "CLOUDFLARE" jsonData;
|
||||||
|
useStagingACME = lib.attrsets.attrByPath [ "dns" "useStagingACME" ] false jsonData;
|
||||||
};
|
};
|
||||||
backup = {
|
backup = {
|
||||||
bucket = lib.attrsets.attrByPath [ "backup" "bucket" ] (lib.attrsets.attrByPath [ "backblaze" "bucket" ] "" jsonData) jsonData;
|
bucket = lib.attrsets.attrByPath [ "backup" "bucket" ] (lib.attrsets.attrByPath [ "backblaze" "bucket" ] "" jsonData) jsonData;
|
||||||
|
|
Loading…
Reference in a new issue