summary refs log tree commit diff
path: root/nixos/modules/services/networking/dhcpcd.nix
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-07-12 16:53:25 -0500
committerWilliam A. Kennington III <william@wkennington.com>2014-08-14 14:05:55 -0500
commita269acf48026b439bce217bd5376bca01298fa07 (patch)
tree8a15b5d758877818ec2ab5fc6d364b21b5a33355 /nixos/modules/services/networking/dhcpcd.nix
parent320a82dd7f821e3383fe63b21c7c99927913631d (diff)
downloadnixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar.gz
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar.bz2
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar.lz
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar.xz
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.tar.zst
nixpkgs-a269acf48026b439bce217bd5376bca01298fa07.zip
nixos/dhcpcd: Use null instead of empty list to disable allowInterfaces
Diffstat (limited to 'nixos/modules/services/networking/dhcpcd.nix')
-rw-r--r--nixos/modules/services/networking/dhcpcd.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix
index c541d4fa604..198c8cb08b2 100644
--- a/nixos/modules/services/networking/dhcpcd.nix
+++ b/nixos/modules/services/networking/dhcpcd.nix
@@ -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.
       '';
     };