mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
An overhaul of the module system.
This commit is contained in:
parent
2bf9997813
commit
d2a823f5bc
11 changed files with 181 additions and 230 deletions
10
default.nix
10
default.nix
|
|
@ -32,13 +32,13 @@ let
|
|||
If only one exists, the path for that one is returned.
|
||||
Otherwise a module is generated which contains both import paths.
|
||||
*/
|
||||
xargNames = lib.unique (lib.folderList ./config [ "trusted" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
|
||||
xarg = lib.mapListToAttrs
|
||||
xargNames = lib.unique (lib.folderList ./config [ "trusted modules" ] ++ lib.folderList ./config/trusted [ "pkgs" "tf" ]);
|
||||
xarg = (lib.mapListToAttrs
|
||||
(folder: lib.nameValuePair folder (lib.domainMerge {
|
||||
inherit folder;
|
||||
folderPaths = [ (./config + "/${folder}") (./config/trusted + "/${folder}") ];
|
||||
}))
|
||||
xargNames;
|
||||
xargNames) // { modules = lib.recursiveMod { folder = ./config/modules; inherit sources; }; };
|
||||
|
||||
/*
|
||||
We provide the runners with this file this way. We also provide our nix args here.
|
||||
|
|
@ -63,6 +63,7 @@ let
|
|||
# This is where the meta config is evaluated.
|
||||
eval = lib.evalModules {
|
||||
modules = lib.singleton metaConfig
|
||||
++ lib.singleton xarg.modules.meta
|
||||
++ lib.attrValues (removeAttrs xarg.targets [ "common" ])
|
||||
++ (map
|
||||
(host: {
|
||||
|
|
@ -70,8 +71,7 @@ let
|
|||
imports = config.lib.kw.nodeImport host;
|
||||
};
|
||||
})
|
||||
(lib.attrNames xarg.hosts))
|
||||
++ lib.singleton ./config/modules/meta/default.nix;
|
||||
(lib.attrNames xarg.hosts));
|
||||
|
||||
specialArgs = {
|
||||
inherit sources root;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue