summary refs log tree commit diff
path: root/nixos/modules/security/acme.nix
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2020-08-24 13:42:11 +0100
committerGitHub <noreply@github.com>2020-08-24 13:42:11 +0100
commit4c9ad3ca793e2418a725f2c227108b71db109913 (patch)
tree3dfb818a33da2cf65515970586a1723cb8792cb3 /nixos/modules/security/acme.nix
parent5c70c5eeaa275aae90e1d3e5b63a6fdcf29bc850 (diff)
parente207de63f4f4a8f377eed1f522dc872f338eb26c (diff)
downloadnixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.gz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.bz2
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.lz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.xz
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.tar.zst
nixpkgs-4c9ad3ca793e2418a725f2c227108b71db109913.zip
Merge branch 'master' into nginx-update
Diffstat (limited to 'nixos/modules/security/acme.nix')
-rw-r--r--nixos/modules/security/acme.nix21
1 files changed, 19 insertions, 2 deletions
diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix
index 1f63e7b88bd..29635dbe864 100644
--- a/nixos/modules/security/acme.nix
+++ b/nixos/modules/security/acme.nix
@@ -150,6 +150,14 @@ let
         '';
       };
 
+      extraLegoFlags = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        description = ''
+          Additional global flags to pass to all lego commands.
+        '';
+      };
+
       extraLegoRenewFlags = mkOption {
         type = types.listOf types.str;
         default = [];
@@ -157,6 +165,14 @@ let
           Additional flags to pass to lego renew.
         '';
       };
+
+      extraLegoRunFlags = mkOption {
+        type = types.listOf types.str;
+        default = [];
+        description = ''
+          Additional flags to pass to lego run.
+        '';
+      };
     };
   };
 
@@ -313,9 +329,10 @@ in
                           ++ optionals (data.dnsProvider != null && !data.dnsPropagationCheck) [ "--dns.disable-cp" ]
                           ++ concatLists (mapAttrsToList (name: root: [ "-d" name ]) data.extraDomains)
                           ++ (if data.dnsProvider != null then [ "--dns" data.dnsProvider ] else [ "--http" "--http.webroot" data.webroot ])
-                          ++ optionals (cfg.server != null || data.server != null) ["--server" (if data.server == null then cfg.server else data.server)];
+                          ++ optionals (cfg.server != null || data.server != null) ["--server" (if data.server == null then cfg.server else data.server)]
+                          ++ data.extraLegoFlags;
                 certOpts = optionals data.ocspMustStaple [ "--must-staple" ];
-                runOpts = escapeShellArgs (globalOpts ++ [ "run" ] ++ certOpts);
+                runOpts = escapeShellArgs (globalOpts ++ [ "run" ] ++ certOpts ++ data.extraLegoRunFlags);
                 renewOpts = escapeShellArgs (globalOpts ++
                   [ "renew" "--days" (toString cfg.validMinDays) ] ++
                   certOpts ++ data.extraLegoRenewFlags);