nixos/dhcpcd: Use null instead of empty list to disable allowInterfaces

This commit is contained in:
William A. Kennington III 2014-07-12 16:53:25 -05:00
parent 320a82dd7f
commit a269acf480

View File

@ -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.
''; '';
}; };