Tree! It's the square hole for imports. That's right. It goes in the

square hole.
This commit is contained in:
kat witch 2021-11-20 23:36:45 +00:00
parent e716081479
commit d0363ab8e9
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
22 changed files with 178 additions and 123 deletions

View file

@ -23,11 +23,55 @@ let
allStr = toString all;
};
tree = import ./tree.nix { inherit lib; } {
inherit sources;
folder = ./config;
config = {
"modules/nixos" = {
functor = {
enable = true;
external = [
(import (sources.arcexprs + "/modules")).nixos
(import (sources.katexprs + "/modules")).nixos
(import (sources.impermanence + "/nixos.nix"))
(import sources.anicca).modules.nixos
(sources.tf-nix + "/modules/nixos/secrets.nix")
(sources.tf-nix + "/modules/nixos/secrets-users.nix")
];
};
};
"modules/home" = {
functor = {
enable = true;
external = [
(import (sources.arcexprs + "/modules")).home-manager
(import (sources.katexprs + "/modules")).home
(import (sources.impermanence + "/home-manager.nix"))
(import sources.anicca).modules.home
(sources.tf-nix + "/modules/home/secrets.nix")
];
};
};
"modules/meta".functor.enable = true;
"profiles/*".functor.enable = true;
"profiles/hardware".evaluateDefault = true;
"profiles/cross".evaluateDefault = true;
"profiles/hardware/*".evaluateDefault = true;
"services/*".aliasDefault = true;
"trusted/secrets".evaluateDefault = true;
"trusted".excludes = [ "tf" ];
"users/*".evaluateDefault = true;
"users/kat/*".functor.enable = true;
"users/kat/services/mpd".functor.enable = true;
};
};
root = ./.;
xarg = lib.recursiveMod { folder = ./config; inherit sources lib; };
metaBase = import ./meta.nix { inherit config lib pkgs root; };
xarg = tree.impure;
eval = lib.evalModules {
modules = lib.singleton metaBase
++ lib.singleton xarg.modules.meta
@ -44,13 +88,14 @@ let
(lib.attrNames xarg.hosts));
specialArgs = {
inherit sources root;
inherit sources root tree;
meta = self;
} // xarg;
};
inherit (eval) config;
self = config // { inherit pkgs lib sourceCache sources; } // xarg;
self = config // { inherit pkgs lib sourceCache sources tree; } // xarg;
in
self