about summary refs log tree commit diff
path: root/modules/profiles
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-12-11 10:23:58 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-12-11 10:23:58 +0100
commit745167880820303fc774776136899378768ddfe7 (patch)
treeca9cab0c3d635f554d7a1d78db6e5a266259f284 /modules/profiles
parent6186ee3ebf2ccdfc4aefc8db820f1053f312c0cc (diff)
profiles/tests: Fix evaluation for real.
This time I've gone through the hoops of almost running out of memory,
because evaluating the channel expression now eats lots of RAM.

Meaning: I've now actually tested it on my system without just throwing
it at the Hydra box which has lots of RAM... unlike my local machine :-(

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/profiles')
-rw-r--r--modules/profiles/tests.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/profiles/tests.nix b/modules/profiles/tests.nix
index 7a7ff822..f258e67f 100644
--- a/modules/profiles/tests.nix
+++ b/modules/profiles/tests.nix
@@ -7,6 +7,8 @@ let
 
   mkTest = attrs: if attrs.check then attrs.paths or [ attrs.path ] else [];
 
+  anyAttrs = pred: cfg: any id (mapAttrsToList (const pred) cfg);
+
   upstreamTests = concatMap mkTest [
     { check = config.services.avahi.enable;
       path  = ["nixos" "avahi"];
@@ -141,7 +143,7 @@ let
     { check = config.networking.bridges != {};
       path  = ["nixos" "networking" whichNet "bridge"];
     }
-    { check = any (iface: iface.useDHCP) config.networking.interfaces;
+    { check = anyAttrs (i: i.useDHCP == true) config.networking.interfaces;
       path  = ["nixos" "networking" whichNet "dhcpOneIf"];
     }
     { check = config.networking.useDHCP;
@@ -153,7 +155,7 @@ let
     { check = config.networking.sits != {};
       path  = ["nixos" "networking" whichNet "sit"];
     }
-    { check = any (iface: iface.ip4 != []) config.networking.interfaces;
+    { check = anyAttrs (i: i.ip4 != []) config.networking.interfaces;
       path  = ["nixos" "networking" whichNet "static"];
     }
     { check = config.networking.vlans != {};
@@ -195,7 +197,7 @@ let
       path  = ["nixos" "pumpio"];
     }
     { check = config.hardware.opengl.driSupport
-           && services.xserver.enable;
+           && config.services.xserver.enable;
       path  = ["nixos" "quake3"];
     }
     { check = true;