feat(reverse-proxy): collect fleet routes

This commit is contained in:
2026-08-17 14:32:08 -04:00
parent 0141962fef
commit 3fca42147d
3 changed files with 54 additions and 2 deletions

View File

@@ -16,6 +16,15 @@ let
serviceIdentityRegistry = import ./service-identities.nix { inherit lib; };
reverseProxyRoutes = import ./reverse-proxy-routes.nix { inherit lib; };
collectReverseProxyRoutes =
hosts:
lib.concatMapAttrs (
hostName: host:
lib.mapAttrs' (
routeName: route: lib.nameValuePair "${hostName}-${routeName}" route
) host.config.modules.reverse-proxy.routes
) hosts;
collectNixFiles =
dir:
flatten (
@@ -34,8 +43,9 @@ let
);
specialArgs = {
inherit inputs;
inherit inputs self;
my = self.lib;
reverseProxyFleetRoutes = self.lib.collectReverseProxyRoutes self.nixosConfigurations;
};
bridgeName = id: "br-vlan${toString id}";
@@ -84,6 +94,7 @@ in
mkHost
mkHosts
bridgeName
collectReverseProxyRoutes
reverseProxyRoutes
;