diff options
author | Luca Bruno <lethalman88@gmail.com> | 2015-11-25 21:31:09 +0100 |
---|---|---|
committer | Luca Bruno <lethalman88@gmail.com> | 2015-11-25 21:37:30 +0100 |
commit | a41292792498e03024d682d092947c2153290073 (patch) | |
tree | b937402b60ea79cfa0e5562dad3268127a491d81 /nixos/modules/system | |
parent | 8a664fd5bc6b170bdf809030de6871fd6a454f5a (diff) | |
parent | b34a6c96ee14518b82648c5a8c1b29225c15d9df (diff) | |
download | nixlib-a41292792498e03024d682d092947c2153290073.tar nixlib-a41292792498e03024d682d092947c2153290073.tar.gz nixlib-a41292792498e03024d682d092947c2153290073.tar.bz2 nixlib-a41292792498e03024d682d092947c2153290073.tar.lz nixlib-a41292792498e03024d682d092947c2153290073.tar.xz nixlib-a41292792498e03024d682d092947c2153290073.tar.zst nixlib-a41292792498e03024d682d092947c2153290073.zip |
Merge remote-tracking branch 'origin/master' into closure-size
Diffstat (limited to 'nixos/modules/system')
-rw-r--r-- | nixos/modules/system/boot/systemd-unit-options.nix | 9 | ||||
-rw-r--r-- | nixos/modules/system/boot/systemd.nix | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/nixos/modules/system/boot/systemd-unit-options.nix b/nixos/modules/system/boot/systemd-unit-options.nix index a7a334dec285..d4cab93b26b8 100644 --- a/nixos/modules/system/boot/systemd-unit-options.nix +++ b/nixos/modules/system/boot/systemd-unit-options.nix @@ -170,6 +170,15 @@ in rec { ''; }; + onFailure = mkOption { + default = []; + type = types.listOf types.str; + description = '' + A list of one or more units that are activated when + this unit enters the "failed" state. + ''; + }; + }; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 0b7647093e0f..d145baeebe93 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -199,6 +199,8 @@ let { X-Restart-Triggers = toString config.restartTriggers; } // optionalAttrs (config.description != "") { Description = config.description; + } // optionalAttrs (config.onFailure != []) { + OnFailure = toString config.onFailure; }; }; }; |