summary refs log tree commit diff
path: root/nixos/modules/tasks
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2018-06-11 16:50:01 +0000
committerGitHub <noreply@github.com>2018-06-11 16:50:01 +0000
commit4d07170dc0b81b0d7d156919e7e101a1c6d1cc60 (patch)
treee5b6a37d47cca96b895c7bf26a87ecce407004b6 /nixos/modules/tasks
parent363363298c95e83c268f3a80c117818169954389 (diff)
downloadnixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar.gz
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar.bz2
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar.lz
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar.xz
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.tar.zst
nixlib-4d07170dc0b81b0d7d156919e7e101a1c6d1cc60.zip
network-interfaces.nix: remove duplicate code
Diffstat (limited to 'nixos/modules/tasks')
-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 14f9b9567515..a3534e10bb17 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";