feat(reverse-proxy): collect fleet routes
This commit is contained in:
@@ -34,8 +34,9 @@ let
|
||||
);
|
||||
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit inputs self;
|
||||
my = self.lib;
|
||||
reverseProxyFleetRoutes = self.lib.reverseProxyRoutes.collectFleetRoutes self.nixosConfigurations;
|
||||
};
|
||||
|
||||
bridgeName = id: "br-vlan${toString id}";
|
||||
|
||||
@@ -64,9 +64,18 @@ let
|
||||
websockets
|
||||
;
|
||||
};
|
||||
|
||||
collectFleetRoutes =
|
||||
hosts:
|
||||
lib.concatMapAttrs (
|
||||
hostName: host:
|
||||
lib.mapAttrs' (
|
||||
routeName: route: lib.nameValuePair "${hostName}-${routeName}" route
|
||||
) host.config.modules.reverse-proxy.routes
|
||||
) hosts;
|
||||
in
|
||||
{
|
||||
inherit mkRouteOptions routeFields;
|
||||
inherit collectFleetRoutes mkRouteOptions routeFields;
|
||||
|
||||
routeType = lib.types.submodule (
|
||||
{ name, ... }:
|
||||
|
||||
Reference in New Issue
Block a user