summary refs log tree commit diff
path: root/nixos/lib/build-vms.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-28 14:56:27 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-07-28 15:04:18 +0200
commit7c30ce95627d63efeca85c4c65aaaee1856b7887 (patch)
tree8febde54241fe6579d33862033d7951dfa380d55 /nixos/lib/build-vms.nix
parent67b1a20f126fb61c43c3a37c2d908ef0302c6c58 (diff)
downloadnixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar.gz
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar.bz2
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar.lz
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar.xz
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.tar.zst
nixpkgs-7c30ce95627d63efeca85c4c65aaaee1856b7887.zip
Remove zipTwoLists
This function is redundant (we also have zipLists).
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r--nixos/lib/build-vms.nix18
1 files changed, 9 insertions, 9 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index d0c9e7c6d23..01d6b21bba9 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -41,22 +41,22 @@ rec {
 
       machines = attrNames nodes;
 
-      machinesNumbered = zipTwoLists machines (range 1 254);
+      machinesNumbered = zipLists machines (range 1 254);
 
-      nodes_ = flip map machinesNumbered (m: nameValuePair m.first
+      nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
         [ ( { config, pkgs, nodes, ... }:
             let
-              interfacesNumbered = zipTwoLists config.virtualisation.vlans (range 1 255);
-              interfaces = flip map interfacesNumbered ({ first, second }:
-                nameValuePair "eth${toString second}" { ip4 =
-                  [ { address = "192.168.${toString first}.${toString m.second}";
+              interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
+              interfaces = flip map interfacesNumbered ({ fst, snd }:
+                nameValuePair "eth${toString snd}" { ip4 =
+                  [ { address = "192.168.${toString fst}.${toString m.snd}";
                       prefixLength = 24;
                   } ];
                 });
             in
             { key = "ip-address";
               config =
-                { networking.hostName = m.first;
+                { networking.hostName = m.fst;
 
                   networking.interfaces = listToAttrs interfaces;
 
@@ -76,11 +76,11 @@ rec {
 
                   virtualisation.qemu.options =
                     flip map interfacesNumbered
-                      ({ first, second }: qemuNICFlags second first m.second);
+                      ({ fst, snd }: qemuNICFlags snd fst m.snd);
                 };
             }
           )
-          (getAttr m.first nodes)
+          (getAttr m.fst nodes)
         ] );
 
     in listToAttrs nodes_;