mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
modules.nix: Generate the extra argument set from the configuration
This allows for module arguments to be handled modularly, in particular allowing the nixpkgs module to handle the nixpkgs import internally. This creates the __internal option namespace, which should only be added to by the module system itself.
This commit is contained in:
parent
4f5c6330c9
commit
1d62ad4746
3 changed files with 36 additions and 8 deletions
|
@ -3,7 +3,7 @@
|
|||
# of the virtual consoles. The latter is useful for the installation
|
||||
# CD.
|
||||
|
||||
{ config, lib, pkgs, baseModules, ... } @ extraArgs:
|
||||
{ config, lib, pkgs, baseModules, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
|
@ -18,7 +18,7 @@ let
|
|||
|
||||
eval = evalModules {
|
||||
modules = [ versionModule ] ++ baseModules;
|
||||
args = (removeAttrs extraArgs ["config" "options"]) // { modules = [ ]; };
|
||||
args = (config.__internal.args) // { modules = [ ]; };
|
||||
};
|
||||
|
||||
manual = import ../../../doc/manual {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue