Code cleanup and readability
This commit is contained in:
parent
a6ad4027a1
commit
71bc768dc1
|
@ -206,7 +206,7 @@ lib: {
|
||||||
in
|
in
|
||||||
builtins.foldl' filter [ ] flattened;
|
builtins.foldl' filter [ ] flattened;
|
||||||
|
|
||||||
doNamespace =
|
createNamespacedModule =
|
||||||
{ namespace, include }:
|
{ namespace, include }:
|
||||||
if namespace == null then
|
if namespace == null then
|
||||||
include
|
include
|
||||||
|
@ -221,16 +221,17 @@ lib: {
|
||||||
description = "include ${namespace}";
|
description = "include ${namespace}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# config.${namespace} = lib.modules.override 1000 {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
namespacedModules = builtins.map createNamespacedModule flattened;
|
||||||
in
|
in
|
||||||
builtins.seq throwOnConflict builtins.map doNamespace flattened;
|
builtins.seq throwOnConflict namespacedModules;
|
||||||
in
|
in
|
||||||
if lib.modules.validate.keys module then
|
if lib.modules.validate.keys module then
|
||||||
{
|
{
|
||||||
inherit __key__;
|
inherit __key__;
|
||||||
__file__ = builtins.toString module.__file__ or file;
|
__file__ = builtins.toString (module.__file__ or file);
|
||||||
includes = normalizeIncludes module.includes or [ ];
|
includes = normalizeIncludes (module.includes or [ ]);
|
||||||
excludes = module.excludes or [ ];
|
excludes = module.excludes or [ ];
|
||||||
options = module.options or { };
|
options = module.options or { };
|
||||||
config =
|
config =
|
||||||
|
|
Loading…
Reference in a new issue