refactor(dotfiles): inline registry definitions

This commit was merged in pull request #112.
This commit is contained in:
2026-09-29 20:16:15 -04:00
parent 16c69e01e1
commit 54335ead82
3 changed files with 18 additions and 30 deletions

View File

@@ -5,9 +5,24 @@
util,
}:
let
definitions = import ./registry/definitions.nix {
inherit lib root util;
};
definitions = lib.genAttrs' (util.collectNixFiles root) (
path: lib.nameValuePair (util.removeNixSuffix path) (mkRegistry path)
);
mkRegistry =
path:
let
evaluated = lib.evalModules {
specialArgs = { inherit util; };
modules = [
(import ./registry/schema.nix { inherit lib; })
path
];
};
in
{
inherit (evaluated.config) type replicate checks;
};
in
{

View File

@@ -1,26 +0,0 @@
{
lib,
root,
util,
}:
let
definitions = lib.genAttrs' (util.collectNixFiles root) (
path: lib.nameValuePair (util.removeNixSuffix path) (mkRegistry path)
);
mkRegistry =
path:
let
evaluated = lib.evalModules {
specialArgs = { inherit util; };
modules = [
(import ./schema.nix { inherit lib; })
path
];
};
in
{
inherit (evaluated.config) type replicate checks;
};
in
definitions