diff --git a/eval-config.nix b/eval-config.nix index 7c6d48ff..71e70ac1 100644 --- a/eval-config.nix +++ b/eval-config.nix @@ -82,12 +82,10 @@ let modules = modules ++ [ argsModule ] ++ baseModules; specialArgs = { modulesPath = builtins.toString ./modules; } // specialArgs; }); -in - -{ - inherit (eval._module.args) pkgs; - inherit (eval) options config; - inherit (eval) _module; - - system = eval.config.system.build.toplevel; -} + + withExtraAttrs = configuration: configuration // { + inherit (configuration._module.args) pkgs; + system = configuration.config.system.build.toplevel; + extendModules = args: withExtraAttrs (configuration.extendModules args); + }; +in withExtraAttrs eval