about summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-11-01 09:40:27 +0100
committerRobert Hensing <robert@roberthensing.nl>2021-11-01 09:41:55 +0100
commit0b0d2637fca96a4e4d7fac4c40e0773bc218ff53 (patch)
treeede240d8e0134a5f81f19017b938c5c6c676ff9b /nixos/lib
parente2bea4427bcf03ae168e45e0bcbd92ac678d91ce (diff)
Revert "nixos/specialisation: Rephrase in terms of extendModules, noUserModules"
This reverts commit e2bea4427bcf03ae168e45e0bcbd92ac678d91ce.

While this commit was probably fine, I want to be conservative
with changes right before the release branch-off.
So far the extendModules commits have been adding and refactoring
expressions that did not affect derivation hashes, whereas this
commit changes the module ordering. I will open a separate PR for
it.
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/eval-config.nix21
1 files changed, 8 insertions, 13 deletions
diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix
index 74b52daa3c8eb..69e0a2afdba3d 100644
--- a/nixos/lib/eval-config.nix
+++ b/nixos/lib/eval-config.nix
@@ -51,28 +51,23 @@ let
     };
   };
 
-  noUserModules = lib.evalModules {
+in rec {
+
+  # Merge the option definitions in all modules, forming the full
+  # system configuration.
+  inherit (lib.evalModules {
     inherit prefix check;
-    modules = baseModules ++ extraModules ++ [ pkgsModule ];
+    modules = baseModules ++ extraModules ++ [ pkgsModule ] ++ modules;
     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 noUserModules baseModules extraModules modules;
+    inherit 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;
 }