refactor(registry): remove legacy endpoint helpers

This commit was merged in pull request #63.
This commit is contained in:
2026-08-25 00:26:32 -04:00
parent cb59b18703
commit 622d09818f
6 changed files with 31 additions and 33 deletions

View File

@@ -15,7 +15,6 @@ let
serviceIdentityRegistry = import ./service-identities.nix { inherit lib; };
registry = import ./registry.nix { inherit lib self; };
networkEndpoints = import ./network-endpoints.nix { inherit lib; };
collectNixFiles =
dir:
@@ -87,7 +86,6 @@ in
mkHosts
bridgeName
registry
networkEndpoints
;
inherit (guests) deriveMac guest;

View File

@@ -1,20 +0,0 @@
{ lib }:
# TODO: Remove this compatibility bridge when route backend resolution reads registry.address directly.
let
endpointFields = address: { inherit address; };
collectFleetEndpoints = hosts:
lib.concatMapAttrs (
hostName: host:
lib.mapAttrs' (
entryName: address:
let
endpointName = if entryName == "self" then hostName else "${hostName}-${entryName}";
in
lib.nameValuePair endpointName (endpointFields address)
) (host.config.registry.address.${hostName} or { })
) hosts;
in
{
inherit collectFleetEndpoints endpointFields;
}