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.
wip/yesman
Silvan Mosberger 4 years ago
parent 41742c85ec
commit dcdd232939
No known key found for this signature in database
GPG Key ID: E8F1E9EAD284E17D
  1. 6
      lib/modules.nix

@ -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 ]

Loading…
Cancel
Save