summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authordanbst <abcz2.uprola@gmail.com>2019-08-05 14:03:38 +0300
committerdanbst <abcz2.uprola@gmail.com>2019-08-05 14:03:38 +0300
commit0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3 (patch)
tree121d16875c362cecba39cee43a9602f71d870fe1 /nixos/lib
parent91bb646e98808d594b339d3386f7963a546ccfb4 (diff)
downloadnixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar.gz
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar.bz2
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar.lz
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar.xz
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.tar.zst
nixpkgs-0f8596ab3f05321e36d9bd53ea7f048b7f0b62e3.zip
mass replace "flip map -> forEach"
See `forEach`-introduction commit.
```
rg 'flip map ' --files-with-matches | xargs sed -i 's/flip map /forEach /g'
```
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/build-vms.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix
index 6c92aa1ffa2..00ab189be0f 100644
--- a/nixos/lib/build-vms.nix
+++ b/nixos/lib/build-vms.nix
@@ -54,11 +54,11 @@ rec {
 
       machinesNumbered = zipLists machines (range 1 254);
 
-      nodes_ = flip map machinesNumbered (m: nameValuePair m.fst
+      nodes_ = forEach machinesNumbered (m: nameValuePair m.fst
         [ ( { config, nodes, ... }:
             let
               interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255);
-              interfaces = flip map interfacesNumbered ({ fst, snd }:
+              interfaces = forEach interfacesNumbered ({ fst, snd }:
                 nameValuePair "eth${toString snd}" { ipv4.addresses =
                   [ { address = "192.168.${toString fst}.${toString m.snd}";
                       prefixLength = 24;
@@ -88,7 +88,7 @@ rec {
                          "${config.networking.hostName}\n"));
 
                   virtualisation.qemu.options =
-                    flip map interfacesNumbered
+                    forEach interfacesNumbered
                       ({ fst, snd }: qemuNICFlags snd fst m.snd);
                 };
             }