summary refs log tree commit diff
path: root/nixos/lib/eval-config.nix
diff options
context:
space:
mode:
authorRobert Hensing2021-10-29 13:17:08 +0200
committerRobert Hensing2021-11-01 09:40:16 +0100
commite2bea4427bcf03ae168e45e0bcbd92ac678d91ce (patch)
tree57ff9cf64d37331bf4ed9e8e0b2377d23eeb1c14 /nixos/lib/eval-config.nix
parent86f5136bafec4a6208ffe23e870f74c731f849de (diff)
nixos/specialisation: Rephrase in terms of extendModules, noUserModules
Diffstat (limited to 'nixos/lib/eval-config.nix')
-rw-r--r--nixos/lib/eval-config.nix21
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;
 }