1 import ./make-test-python.nix {
2 name = "specialisation";
4 inheritconf = { pkgs, ... }: {
5 environment.systemPackages = [ pkgs.cowsay ];
6 specialisation.inheritconf.configuration = { pkgs, ... }: {
7 environment.systemPackages = [ pkgs.hello ];
10 noinheritconf = { pkgs, ... }: {
11 environment.systemPackages = [ pkgs.cowsay ];
12 specialisation.noinheritconf = {
13 inheritParentConfig = false;
14 configuration = { pkgs, ... }: {
15 environment.systemPackages = [ pkgs.hello ];
21 inheritconf.wait_for_unit("default.target")
22 inheritconf.succeed("cowsay hey")
23 inheritconf.fail("hello")
25 with subtest("Nested clones do inherit from parent"):
27 "/run/current-system/specialisation/inheritconf/bin/switch-to-configuration test"
29 inheritconf.succeed("cowsay hey")
30 inheritconf.succeed("hello")
32 noinheritconf.wait_for_unit("default.target")
33 noinheritconf.succeed("cowsay hey")
34 noinheritconf.fail("hello")
36 with subtest("Nested children do not inherit from parent"):
37 noinheritconf.succeed(
38 "/run/current-system/specialisation/noinheritconf/bin/switch-to-configuration test"
40 noinheritconf.fail("cowsay hey")
41 noinheritconf.succeed("hello")