diff options
author | Poscat <poscat@mail.poscat.moe> | 2021-10-06 17:53:04 +0800 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-11-24 13:50:20 -0800 |
commit | 942f57e79b6453d0efca677bf1094abc3a7f65d2 (patch) | |
tree | e7f6def110d70c92093b7ae556c582ff9c46abaa /nixos | |
parent | c85680db4fb2137cad8e2395c02d2ad4a5af59cc (diff) |
nixos/acme: add an option for reloading systemd services after renewal
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/security/acme.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/security/acme.nix b/nixos/modules/security/acme.nix index cfbc8e91903ef..88c5774d187c8 100644 --- a/nixos/modules/security/acme.nix +++ b/nixos/modules/security/acme.nix @@ -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 = ""; |