mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
nixos/dhcpcd: Use null instead of empty list to disable allowInterfaces
This commit is contained in:
parent
320a82dd7f
commit
a269acf480
@ -40,7 +40,7 @@ let
|
|||||||
denyinterfaces ${toString ignoredInterfaces} lo peth* vif* tap* tun* virbr* vnet* vboxnet*
|
denyinterfaces ${toString ignoredInterfaces} lo peth* vif* tap* tun* virbr* vnet* vboxnet*
|
||||||
|
|
||||||
# Use the list of allowed interfaces if specified
|
# Use the list of allowed interfaces if specified
|
||||||
${optionalString (cfg.allowInterfaces != [ ]) "allowinterfaces ${toString cfg.allowInterfaces}"}
|
${optionalString (cfg.allowInterfaces != null) "allowinterfaces ${toString cfg.allowInterfaces}"}
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
'';
|
'';
|
||||||
@ -86,13 +86,13 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.dhcpcd.allowInterfaces = mkOption {
|
networking.dhcpcd.allowInterfaces = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.nullOr (types.listOf types.str);
|
||||||
default = [];
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Enable the DHCP client for any interface whose name matches
|
Enable the DHCP client for any interface whose name matches
|
||||||
any of the shell glob patterns in this list. Any interface not
|
any of the shell glob patterns in this list. Any interface not
|
||||||
explicitly matched by this pattern will be denied. This pattern only
|
explicitly matched by this pattern will be denied. This pattern only
|
||||||
applies when the list is non-empty.
|
applies when non-null.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user