diff --git a/system/system.nix b/system/system.nix index d4507258a341..1b910d39e94c 100644 --- a/system/system.nix +++ b/system/system.nix @@ -197,6 +197,16 @@ rec { # system configurations. grubMenuBuilder = config.system.build.grubMenuBuilder; + # This attribute is responsible for creating boot entries for + # child configuration. They are only (directly) accessible + # when the parent configuration is boot default. For example, + # you can provide an easy way to boot the same configuration + # as you use, but with another kernel + children = map (x: ((import ./system.nix) + { inherit platform; + configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system) + config.nesting.children; + configurationName = config.boot.configurationName; # Putting it all together. This builds a store object containing # symlinks to the various parts of the built configuration (the @@ -216,6 +226,8 @@ rec { inherit grubMenuBuilder; inherit etc; inherit systemPath; + inherit children; + inherit configurationName; kernel = kernel + "/vmlinuz"; initrd = initialRamdisk + "/initrd"; # Most of these are needed by grub-install. @@ -228,16 +240,6 @@ rec { pkgs.upstart # for initctl ]; upstartInterfaceVersion = pkgs.upstart.interfaceVersion; - # This attribute is responsible for creating boot entries for - # child configuration. They are only (directly) accessible - # when the parent configuration is boot default. For example, - # you can provide an easy way to boot the same configuration - # as you use, but with another kernel - children = map (x: ((import ./system.nix) - { inherit platform; - configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system) - config.nesting.children; - configurationName = config.boot.configurationName; }) config.environment.checkConfigurationOptions optionDeclarations config;