@@ -0,0 +1,42 @@
1+import ./make-test.nix {
2+ name = "nesting";
3+ nodes = {
4+ clone = { pkgs, ... }: {
5+ environment.systemPackages = [ pkgs.cowsay ];
6+ nesting.clone = [
7+ ({ pkgs, ... }: {
8+ environment.systemPackages = [ pkgs.hello ];
9+ })
10+ ];
11+ };
12+ children = { pkgs, ... }: {
13+ environment.systemPackages = [ pkgs.cowsay ];
14+ nesting.children = [
15+ ({ pkgs, ... }: {
16+ environment.systemPackages = [ pkgs.hello ];
17+ })
18+ ];
19+ };
20+ };
21+ testScript = ''
22+ $clone->waitForUnit("default.target");
23+ $clone->succeed("cowsay hey");
24+ $clone->fail("hello");
25+
26+ # Nested clones do inherit from parent
27+ $clone->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test");
28+ $clone->succeed("cowsay hey");
29+ $clone->succeed("hello");
30+
31+
32+ $children->waitForUnit("default.target");
33+ $children->succeed("cowsay hey");
34+ $children->fail("hello");
35+
36+ # Nested children do not inherit from parent
37+ $children->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test");
38+ $children->fail("cowsay hey");
39+ $children->succeed("hello");
40+
41+ '';
42+}