mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 14:11:36 +00:00
nixos/systemd: add missing defaults, make options nullable
Otherwise evaluation will fail if these are not set.
This commit is contained in:
parent
a2e8547c36
commit
3b2b3f7c53
|
@ -819,7 +819,8 @@ in
|
|||
};
|
||||
|
||||
systemd.watchdog.device = mkOption {
|
||||
type = types.path;
|
||||
type = types.nullOr types.path;
|
||||
default = null;
|
||||
example = "/dev/watchdog";
|
||||
description = ''
|
||||
The path to a hardware watchdog device which will be managed by systemd.
|
||||
|
@ -828,7 +829,8 @@ in
|
|||
};
|
||||
|
||||
systemd.watchdog.runtimeTime = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "30s";
|
||||
description = ''
|
||||
The amount of time which can elapse before a watchdog hardware device
|
||||
|
@ -838,7 +840,8 @@ in
|
|||
};
|
||||
|
||||
systemd.watchdog.rebootTime = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "10m";
|
||||
description = ''
|
||||
The amount of time which can elapse after a reboot has been triggered
|
||||
|
@ -848,7 +851,8 @@ in
|
|||
};
|
||||
|
||||
systemd.watchdog.kexecTime = mkOption {
|
||||
type = types.str;
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
example = "10m";
|
||||
description = ''
|
||||
The amount of time which can elapse when kexec is being executed before
|
||||
|
@ -928,16 +932,16 @@ in
|
|||
DefaultIPAccounting=yes
|
||||
''}
|
||||
DefaultLimitCORE=infinity
|
||||
${optionalString (config.systemd.watchdog.device != "") ''
|
||||
${optionalString (config.systemd.watchdog.device != null) ''
|
||||
WatchdogDevice=${config.systemd.watchdog.device}
|
||||
''}
|
||||
${optionalString (config.systemd.watchdog.runtimeTime != "") ''
|
||||
${optionalString (config.systemd.watchdog.runtimeTime != null) ''
|
||||
RuntimeWatchdogSec=${config.systemd.watchdog.runtimeTime}
|
||||
''}
|
||||
${optionalString (config.systemd.watchdog.rebootTime != "") ''
|
||||
${optionalString (config.systemd.watchdog.rebootTime != null) ''
|
||||
RebootWatchdogSec=${config.systemd.watchdog.rebootTime}
|
||||
''}
|
||||
${optionalString (config.systemd.watchdog.kexecTime != "") ''
|
||||
${optionalString (config.systemd.watchdog.kexecTime != null) ''
|
||||
KExecWatchdogSec=${config.systemd.watchdog.kexecTime}
|
||||
''}
|
||||
|
||||
|
|
Loading…
Reference in a new issue