nixos/systemd: Add onSuccess module option for units

This commit is contained in:
Giulio De Pasquale 2022-04-07 13:21:58 +02:00
parent 79b72e2110
commit fbc8dbb075
2 changed files with 11 additions and 0 deletions

View File

@ -285,6 +285,8 @@ in rec {
Documentation = toString config.documentation; }
// optionalAttrs (config.onFailure != []) {
OnFailure = toString config.onFailure; }
// optionalAttrs (config.onSuccess != []) {
OnSuccess = toString config.onSuccess; }
// optionalAttrs (options.startLimitIntervalSec.isDefined) {
StartLimitIntervalSec = toString config.startLimitIntervalSec;
} // optionalAttrs (options.startLimitBurst.isDefined) {

View File

@ -201,6 +201,15 @@ in rec {
'';
};
onSuccess = mkOption {
default = [];
type = types.listOf unitNameType;
description = ''
A list of one or more units that are activated when
this unit enters the "inactive" state.
'';
};
startLimitBurst = mkOption {
type = types.int;
description = ''