summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-06-13 23:55:46 +0200
committerGitHub <noreply@github.com>2018-06-13 23:55:46 +0200
commit8e5891b33efdf7ebb78b254a97d27f7c8a0772ab (patch)
treea7068ca8ad51553d66bd8f2f81d7619c7d594b51 /nixos
parentcc7aa24c8c39d2817ad6aa302ecbf8fc421b9431 (diff)
parent4d07170dc0b81b0d7d156919e7e101a1c6d1cc60 (diff)
downloadnixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar.gz
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar.bz2
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar.lz
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar.xz
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.tar.zst
nixpkgs-8e5891b33efdf7ebb78b254a97d27f7c8a0772ab.zip
Merge pull request #41853 from volth/patch-153
network-interfaces.nix: remove duplicate code
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/tasks/network-interfaces.nix16
1 files changed, 0 insertions, 16 deletions
diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix
index 14f9b956751..a3534e10bb1 100644
--- a/nixos/modules/tasks/network-interfaces.nix
+++ b/nixos/modules/tasks/network-interfaces.nix
@@ -46,22 +46,6 @@ let
     '';
   });
 
-  # Collect all interfaces that are defined for a device
-  # as device:interface key:value pairs.
-  wlanDeviceInterfaces =
-    let
-      allDevices = unique (mapAttrsToList (_: v: v.device) cfg.wlanInterfaces);
-      interfacesOfDevice = d: filterAttrs (_: v: v.device == d) cfg.wlanInterfaces;
-    in
-      genAttrs allDevices (d: interfacesOfDevice d);
-
-  # Convert device:interface key:value pairs into a list, and if it exists,
-  # place the interface which is named after the device at the beginning.
-  wlanListDeviceFirst = device: interfaces:
-    if hasAttr device interfaces
-    then mapAttrsToList (n: v: v//{_iName=n;}) (filterAttrs (n: _: n==device) interfaces) ++ mapAttrsToList (n: v: v//{_iName=n;}) (filterAttrs (n: _: n!=device) interfaces)
-    else mapAttrsToList (n: v: v // {_iName = n;}) interfaces;
-
   # We must escape interfaces due to the systemd interpretation
   subsystemDevice = interface:
     "sys-subsystem-net-devices-${escapeSystemdPath interface}.device";