Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ rec {
, # This should only be used for special arguments that need to be evaluated
# when resolving module structure (like in imports). For everything else,
# there's _module.args.
specialArgs ? {}
importsArgs ? {}
, # This would be remove in the future, Prefer _module.args option instead.
args ? {}
, # This would be remove in the future, Prefer _module.check option instead.
Expand Down Expand Up @@ -55,7 +55,7 @@ rec {
};
};

closed = closeModules (modules ++ [ internalModule ]) (specialArgs // { inherit config options; lib = import ./.; });
closed = closeModules (modules ++ [ internalModule ]) (importsArgs // { inherit config options; lib = import ./.; });

# Note: the list of modules is reversed to maintain backward
# compatibility with the old module system. Not sure if this is
Expand Down
5 changes: 4 additions & 1 deletion nixos/lib/eval-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
baseModules ? import ../modules/module-list.nix
, # !!! See comment about args in lib/modules.nix
extraArgs ? {}
, # !!! See comment in lib/modules.nix
# This are attributes which are used for importing modules.
importsArgs ? {}
, modules
, # !!! See comment about check in lib/modules.nix
check ? true
Expand Down Expand Up @@ -47,7 +50,7 @@ in rec {
inherit prefix check;
modules = modules ++ extraModules ++ baseModules ++ [ pkgsModule ];
args = extraArgs;
specialArgs = { modulesPath = ../modules; };
importsArgs = { modulesPath = ../modules; } // importsArgs;
}) config options;

# These are the extra arguments passed to every module. In
Expand Down