chore(lib/treewide): cleanup directory struture of lib. See lib/readme.md for details

This commit is contained in:
Johannes Kirschbauer
2025-04-02 10:32:58 +02:00
parent e5d8245751
commit 6e16d1345e
21 changed files with 92 additions and 94 deletions

View File

@@ -13,14 +13,13 @@ lib.fix (clanLib: {
# We should reduce the dependency on 'self' aka the 'flake' object
# This makes it easier to test
# most of the time passing the whole flake is unnecessary
callLib = file: args: import file { inherit lib clanLib; } // args;
callLib = file: args: import file ({ inherit lib clanLib; } // args);
evalClan = import ./eval-clan-modules {
evalClan = import ./inventory/eval-clan-modules {
inherit lib;
clan-core = self;
pkgs = nixpkgs.legacyPackages.x86_64-linux;
};
buildClanModule = import ./build-clan {
inherit lib nixpkgs;
};
@@ -28,9 +27,9 @@ lib.fix (clanLib: {
# ------------------------------------
# Lib functions that don't depend on 'self'
inventory = clanLib.callLib ./inventory { };
modules = clanLib.callLib ./frontmatter { };
facts = import ./facts.nix { inherit lib; };
values = import ./values { inherit lib; };
modules = clanLib.callLib ./inventory/frontmatter { };
values = import ./introspection { inherit lib; };
jsonschema = import ./jsonschema { inherit lib; };
select = import ./select.nix;
facts = import ./facts.nix { inherit lib; };
})