refactor(dotfiles): remove registry replication
This commit is contained in:
@@ -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
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user