about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2015-12-11 05:21:27 +0100
committeraszlig <aszlig@redmoonstudios.org>2015-12-11 05:21:27 +0100
commit006d6a6dd58c2e7fa7ddb88ed26b9aa6c1802f29 (patch)
tree8c1094fe31a289f91a7e188ee9dfa1a18cee357f /lib
parentde77a794486a31f66cd0fb8cd90653941dbe6d20 (diff)
profiles/common: Pass tests attribute to modules.
This is going to be used in modules or configurations to include tests
specific to the module, for example let's say you have a foo.nix module
that defines a foo service and you have a test named "foo" in the
tests.vuizvui namespace.

You can use it like this:

{ config, tests, lib, ... }:

{
  ... other options of the foo service module ...
  config = lib.mkIf config.foo.enable {
    vuizvui.requiresTests = [ tests.vuizvui.foo ];
  };
}

If a machine config enables the module foo (foo.enable = true) then the
"foo" test is also a constituent of the machine channel for the machine.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions