lib/modules: Remove internal _module attribute from config

The _module option is added as an internal option set, and it messes up
the results of module evaluations, requiring people to manually filter
_modules out.

If people depend on this, they can still use config._module from inside
the modules, exposing _module as an explicitly declared user option. Or
alternatively with the _module attribute now returned by evalModules.
This commit is contained in:
Silvan Mosberger 2020-03-16 21:05:52 +01:00
parent 41742c85ec
commit dcdd232939
No known key found for this signature in database
GPG key ID: E8F1E9EAD284E17D

View file

@ -93,7 +93,11 @@ rec {
res set._definedNames
else
res;
result = { inherit options config; };
result = {
inherit options;
config = removeAttrs config [ "_module" ];
inherit (config) _module;
};
in result;
# collectModules :: (modulesPath: String) -> (modules: [ Module ]) -> (args: Attrs) -> [ Module ]