mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-24 03:43:53 +03:00
Merge pull request #11056 from offlinehacker/nixos/systemd/onfailure
systemd module: Add OnFailure to systemd common unit options
This commit is contained in:
commit
cbca877b01
@ -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.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -199,6 +199,8 @@ let
|
||||
{ X-Restart-Triggers = toString config.restartTriggers; }
|
||||
// optionalAttrs (config.description != "") {
|
||||
Description = config.description;
|
||||
} // optionalAttrs (config.onFailure != []) {
|
||||
OnFailure = toString config.onFailure;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user