refactor(dotfiles): remove registry replication

This commit is contained in:
2026-10-01 21:41:43 -04:00
parent 87776c8994
commit 97051cd056
4 changed files with 17 additions and 91 deletions

View File

@@ -22,9 +22,17 @@ let
};
in
{
inherit (evaluated.config) type replicate checks;
inherit (evaluated.config) type checks;
};
data = validate (
lib.mapAttrs (
registryName: _registry:
lib.mapAttrs (hostName: host: host.config.registry.${registryName}.${hostName} or { }) hosts
) definitions
);
validate = import ./registry/validation.nix { inherit definitions lib; };
in
{
types = lib.mapAttrs (_name: definition: definition.type) definitions;
@@ -43,8 +51,13 @@ in
) definitions;
};
collected = import ./registry/collection.nix {
inherit definitions hosts lib;
validate = import ./registry/validation.nix { inherit definitions lib; };
collected = data // {
join =
host: entry:
lib.filterAttrs (_name: value: value != null) (
lib.mapAttrs (
registryName: _registry: (data.${registryName}.${host} or { }).${entry} or null
) definitions
);
};
}