about summary refs log tree commit diff
path: root/modules/profiles/common.nix
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-12-11 07:34:35 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-12-11 07:34:35 +0100
commitaa6741135cb7e78ab038eee798067f2df32bb6d9 (patch)
treec89fdc06e3ba3918aa1915366bedbf5756fcd4e2 /modules/profiles/common.nix
parentf48fe4b7f4509c919e3897e83490da34a095d0fc (diff)
modules: Make requiresTests a list of paths.
Unfortunately, we went into trouble and the Hydra machine not only
consumed lots of ram during evaluation but it also triggered a bunch of
evaluation errors because the available tests were strictly evaluated.

Using attribute paths consisting of plain strings doesn't have the same
problem, even though they look a bit uglier.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules/profiles/common.nix')
-rw-r--r--modules/profiles/common.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/profiles/common.nix b/modules/profiles/common.nix
index 58d6c27b..486426e9 100644
--- a/modules/profiles/common.nix
+++ b/modules/profiles/common.nix
@@ -35,11 +35,15 @@ with lib;
     };
 
     requiresTests = mkOption {
-      type = types.listOf types.package;
+      type = types.listOf (types.listOf types.str);
       default = [];
+      example = [ ["nixos" "nat" "firewall"] ["vuizvui" "foo"] ];
       description = ''
-        A list of derivations which have to succeed in order to trigger a
-        channel update for the current configuration/machine.
+        A list of attribute paths to the tests which need to succeed in order to
+        trigger a channel update for the current configuration/machine.
+
+        Every attribute path itself is a list of attribute names, which are
+        queried using <function>lib.getAttrFromPath</function>.
       '';
     };
   };
@@ -93,9 +97,5 @@ with lib;
         rootChannelsPath
       ] ++ optional config.vuizvui.enableGlobalNixpkgsConfig nixpkgsConfig;
     in mkIf config.vuizvui.modifyNixPath (mkOverride 90 nixPath);
-
-    _module.args.tests = import ../../lib/get-tests.nix {
-      inherit nixpkgs system;
-    };
   };
 }