···
22
-
validMin = mkOption {
24
-
default = 30 * 24 * 3600;
25
-
description = "Minimum remaining validity before renewal in seconds.";
28
-
renewInterval = mkOption {
32
-
Systemd calendar expression when to check for renewal. See
33
-
<citerefentry><refentrytitle>systemd.time</refentrytitle>
34
-
<manvolnum>5</manvolnum></citerefentry>.
type = types.nullOr types.str;
···
95
+
validMin = mkOption {
97
+
default = 30 * 24 * 3600;
98
+
description = "Minimum remaining validity before renewal in seconds.";
101
+
renewInterval = mkOption {
103
+
default = "weekly";
105
+
Systemd calendar expression when to check for renewal. See
106
+
<citerefentry><refentrytitle>systemd.time</refentrytitle>
107
+
<manvolnum>5</manvolnum></citerefentry>.
type = types.loaOf types.optionSet;
···
systemd.services = flip mapAttrs' cfg.certs (cert: data:
cpath = "${cfg.directory}/${cert}";
139
-
cmdline = [ "-v" "-d" cert "--default_root" data.webroot "--valid_min" data.validMin ]
139
+
cmdline = [ "-v" "-d" cert "--default_root" data.webroot "--valid_min" cfg.validMin ]
++ optionals (data.email != null) [ "--email" data.email ]
++ concatMap (p: [ "-f" p ]) data.plugins
++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
···
description = "timer for ACME cert renewal of ${cert}";
wantedBy = [ "timers.target" ];
189
-
OnCalendar = data.renewInterval;
189
+
OnCalendar = cfg.renewInterval;
Unit = "acme-simp_le-${cert}.service";