diff options
Diffstat (limited to 'nixos/lib/eval-config.nix')
-rw-r--r-- | nixos/lib/eval-config.nix | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 69e0a2afdba3..74b52daa3c8e 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -51,23 +51,28 @@ let }; }; -in rec { - - # Merge the option definitions in all modules, forming the full - # system configuration. - inherit (lib.evalModules { + noUserModules = lib.evalModules { inherit prefix check; - modules = baseModules ++ extraModules ++ [ pkgsModule ] ++ modules; + modules = baseModules ++ extraModules ++ [ pkgsModule ]; args = extraArgs; specialArgs = { modulesPath = builtins.toString ../modules; } // specialArgs; - }) config options _module type; + }; # These are the extra arguments passed to every module. In # particular, Nixpkgs is passed through the "pkgs" argument. extraArgs = extraArgs_ // { - inherit baseModules extraModules modules; + inherit noUserModules baseModules extraModules modules; }; +in rec { + + # Merge the option definitions in all modules, forming the full + # system configuration. + inherit (noUserModules.extendModules { inherit modules; }) + config options _module type; + + inherit extraArgs; + inherit (_module.args) pkgs; } |