Merge pull request #99115 from Infinisil/toString-module-files
lib/modules: Make sure to not import module _file's into the store
This commit is contained in:
commit
e08182020c
@ -265,7 +265,7 @@ rec {
|
|||||||
if badAttrs != {} then
|
if badAttrs != {} then
|
||||||
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute."
|
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute."
|
||||||
else
|
else
|
||||||
{ _file = m._file or file;
|
{ _file = toString m._file or file;
|
||||||
key = toString m.key or key;
|
key = toString m.key or key;
|
||||||
disabledModules = m.disabledModules or [];
|
disabledModules = m.disabledModules or [];
|
||||||
imports = m.imports or [];
|
imports = m.imports or [];
|
||||||
@ -273,7 +273,7 @@ rec {
|
|||||||
config = addFreeformType (addMeta (m.config or {}));
|
config = addFreeformType (addMeta (m.config or {}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ _file = m._file or file;
|
{ _file = toString m._file or file;
|
||||||
key = toString m.key or key;
|
key = toString m.key or key;
|
||||||
disabledModules = m.disabledModules or [];
|
disabledModules = m.disabledModules or [];
|
||||||
imports = m.require or [] ++ m.imports or [];
|
imports = m.require or [] ++ m.imports or [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user