Support module keys that are paths
This commit is contained in:
parent
985f1f2d8a
commit
9143910139
|
@ -42,14 +42,14 @@ rec {
|
||||||
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'."
|
throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'."
|
||||||
else
|
else
|
||||||
{ inherit file;
|
{ inherit file;
|
||||||
key = m.key or key;
|
key = toString m.key or key;
|
||||||
imports = m.imports or [];
|
imports = m.imports or [];
|
||||||
options = m.options or {};
|
options = m.options or {};
|
||||||
config = m.config or {};
|
config = m.config or {};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ inherit file;
|
{ inherit file;
|
||||||
key = m.key or key;
|
key = toString m.key or key;
|
||||||
imports = m.require or [] ++ m.imports or [];
|
imports = m.require or [] ++ m.imports or [];
|
||||||
options = {};
|
options = {};
|
||||||
config = removeAttrs m ["key" "require" "imports"];
|
config = removeAttrs m ["key" "require" "imports"];
|
||||||
|
|
Loading…
Reference in New Issue