mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
parent
54fff9ec1a
commit
e3559c23c2
@ -19,6 +19,12 @@ let
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
domain = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
|
description = "Domain to fetch certificate for (defaults to the entry name)";
|
||||||
|
};
|
||||||
|
|
||||||
email = mkOption {
|
email = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default = null;
|
default = null;
|
||||||
@ -157,9 +163,10 @@ in
|
|||||||
servicesLists = mapAttrsToList certToServices cfg.certs;
|
servicesLists = mapAttrsToList certToServices cfg.certs;
|
||||||
certToServices = cert: data:
|
certToServices = cert: data:
|
||||||
let
|
let
|
||||||
|
domain = if data.domain != null then data.domain else cert;
|
||||||
cpath = "${cfg.directory}/${cert}";
|
cpath = "${cfg.directory}/${cert}";
|
||||||
rights = if data.allowKeysForGroup then "750" else "700";
|
rights = if data.allowKeysForGroup then "750" else "700";
|
||||||
cmdline = [ "-v" "-d" cert "--default_root" data.webroot "--valid_min" cfg.validMin ]
|
cmdline = [ "-v" "-d" domain "--default_root" data.webroot "--valid_min" cfg.validMin ]
|
||||||
++ optionals (data.email != null) [ "--email" data.email ]
|
++ optionals (data.email != null) [ "--email" data.email ]
|
||||||
++ concatMap (p: [ "-f" p ]) data.plugins
|
++ concatMap (p: [ "-f" p ]) data.plugins
|
||||||
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
|
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
|
||||||
|
Loading…
Reference in New Issue
Block a user