Revert "nixos/specialisation: Rephrase in terms of extendModules, noUserModules"

This reverts commit e2bea4427b.

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.
This commit is contained in:
Robert Hensing 2021-11-01 09:40:27 +01:00
parent e2bea4427b
commit 0b0d2637fc
2 changed files with 25 additions and 36 deletions

View file

@ -51,28 +51,23 @@ let
};
};
noUserModules = lib.evalModules {
inherit prefix check;
modules = baseModules ++ extraModules ++ [ pkgsModule ];
args = extraArgs;
specialArgs =
{ modulesPath = builtins.toString ../modules; } // specialArgs;
};
# 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;
};
in rec {
# Merge the option definitions in all modules, forming the full
# system configuration.
inherit (noUserModules.extendModules { inherit modules; })
config options _module type;
inherit (lib.evalModules {
inherit prefix check;
modules = baseModules ++ extraModules ++ [ pkgsModule ] ++ modules;
args = extraArgs;
specialArgs =
{ modulesPath = builtins.toString ../modules; } // specialArgs;
}) config options _module type;
inherit extraArgs;
# 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 (_module.args) pkgs;
}