mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +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*
|
||||
|
||||
# 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}
|
||||
'';
|
||||
@ -86,13 +86,13 @@ in
|
||||
};
|
||||
|
||||
networking.dhcpcd.allowInterfaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
type = types.nullOr (types.listOf types.str);
|
||||
default = null;
|
||||
description = ''
|
||||
Enable the DHCP client for any interface whose name matches
|
||||
any of the shell glob patterns in this list. Any interface not
|
||||
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