diff options
author | Janne Heß <janne@hess.ooo> | 2022-01-29 23:01:24 +0100 |
---|---|---|
committer | Janne Heß <janne@hess.ooo> | 2022-02-09 15:14:37 +0100 |
commit | b5b3ee4f7884bf70c04f325e043fe76843b5eacd (patch) | |
tree | 5de93ebd959202b52d8ccdee819ce964892964e8 /nixos/lib/systemd-unit-options.nix | |
parent | b9bb1de34121312c4c37829b8ee10c81ffd2187a (diff) |
nixos/systemd: Add reloadTriggers to services
Diffstat (limited to 'nixos/lib/systemd-unit-options.nix')
-rw-r--r-- | nixos/lib/systemd-unit-options.nix | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nixos/lib/systemd-unit-options.nix b/nixos/lib/systemd-unit-options.nix index 520f2e982a266..8029ba0e3f6cf 100644 --- a/nixos/lib/systemd-unit-options.nix +++ b/nixos/lib/systemd-unit-options.nix @@ -201,6 +201,17 @@ in rec { ''; }; + reloadTriggers = mkOption { + default = []; + type = types.listOf unitOption; + description = '' + An arbitrary list of items such as derivations. If any item + in the list changes between reconfigurations, the service will + be reloaded. If anything but a reload trigger changes in the + unit file, the unit will be restarted instead. + ''; + }; + onFailure = mkOption { default = []; type = types.listOf unitNameType; @@ -338,6 +349,11 @@ in rec { configuration switch if its definition has changed. If enabled, the value of <option>restartIfChanged</option> is ignored. + + This option should not be used anymore in favor of + <option>reloadTriggers</option> which allows more granular + control of when a service is reloaded and when a service + is restarted. ''; }; |