Merge pull request #147504 from NixOS/backport-140743-to-release-21.11

[Backport release-21.11] nixos/acme: add an option for reloading systemd services after renewal
This commit is contained in:
Aaron Andersen
2021-11-26 09:37:43 -05:00
committed by GitHub

View File

@@ -314,6 +314,9 @@ let
if [ -e renewed ]; then
rm renewed
${data.postRun}
${optionalString (data.reloadServices != [])
"systemctl --no-block try-reload-or-restart ${escapeShellArgs data.reloadServices}"
}
fi
'');
};
@@ -474,6 +477,15 @@ let
description = "Group running the ACME client.";
};
reloadServices = mkOption {
type = types.listOf types.str;
default = [];
description = ''
The list of systemd services to call <code>systemctl try-reload-or-restart</code>
on.
'';
};
postRun = mkOption {
type = types.lines;
default = "";