nixos: add dhcpcd.persistent option
This commit is contained in:
parent
99243a5c51
commit
8c9b6d932a
|
@ -64,7 +64,7 @@ let
|
||||||
# ${config.systemd.package}/bin/systemctl start ip-down.target
|
# ${config.systemd.package}/bin/systemctl start ip-down.target
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
${config.networking.dhcpcd.runHook}
|
${cfg.runHook}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -75,6 +75,18 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
networking.dhcpcd.persistent = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whenever to leave interfaces configured on dhcpcd daemon
|
||||||
|
shutdown. Set to true if you have your root or store mounted
|
||||||
|
over the network or this machine accepts SSH connections
|
||||||
|
through DHCP interfaces and clients should be notified when
|
||||||
|
it shuts down.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
networking.dhcpcd.denyInterfaces = mkOption {
|
networking.dhcpcd.denyInterfaces = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
@ -139,7 +151,7 @@ in
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ Type = "forking";
|
{ Type = "forking";
|
||||||
PIDFile = "/run/dhcpcd.pid";
|
PIDFile = "/run/dhcpcd.pid";
|
||||||
ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet --config ${dhcpcdConf}";
|
ExecStart = "@${dhcpcd}/sbin/dhcpcd dhcpcd --quiet ${optionalString cfg.persistent "--persistent"} --config ${dhcpcdConf}";
|
||||||
ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
|
ExecReload = "${dhcpcd}/sbin/dhcpcd --rebind";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue