Merge pull request #89779 from jktr/acme-extra-flags
nixos/acme: extra lego flags
This commit is contained in:
commit
8a141825a3
@ -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 {
|
extraLegoRenewFlags = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
@ -157,6 +165,14 @@ let
|
|||||||
Additional flags to pass to lego renew.
|
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" ]
|
++ optionals (data.dnsProvider != null && !data.dnsPropagationCheck) [ "--dns.disable-cp" ]
|
||||||
++ concatLists (mapAttrsToList (name: root: [ "-d" name ]) data.extraDomains)
|
++ concatLists (mapAttrsToList (name: root: [ "-d" name ]) data.extraDomains)
|
||||||
++ (if data.dnsProvider != null then [ "--dns" data.dnsProvider ] else [ "--http" "--http.webroot" data.webroot ])
|
++ (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" ];
|
certOpts = optionals data.ocspMustStaple [ "--must-staple" ];
|
||||||
runOpts = escapeShellArgs (globalOpts ++ [ "run" ] ++ certOpts);
|
runOpts = escapeShellArgs (globalOpts ++ [ "run" ] ++ certOpts ++ data.extraLegoRunFlags);
|
||||||
renewOpts = escapeShellArgs (globalOpts ++
|
renewOpts = escapeShellArgs (globalOpts ++
|
||||||
[ "renew" "--days" (toString cfg.validMinDays) ] ++
|
[ "renew" "--days" (toString cfg.validMinDays) ] ++
|
||||||
certOpts ++ data.extraLegoRenewFlags);
|
certOpts ++ data.extraLegoRenewFlags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user