systemd module: Add OnFailure to systemd common unit options

Changed files
+11
nixos
+9
nixos/modules/system/boot/systemd-unit-options.nix
···
'';
};
+
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.
+
'';
+
};
+
};
+2
nixos/modules/system/boot/systemd.nix
···
{ X-Restart-Triggers = toString config.restartTriggers; }
// optionalAttrs (config.description != "") {
Description = config.description;
+
} // optionalAttrs (config.onFailure != []) {
+
OnFailure = toString config.onFailure;
};
};
};