feat(reverse-proxy): derive backends from endpoints

This commit was merged in pull request #52.
This commit is contained in:
2026-08-20 20:04:34 -04:00
parent bd2c1583da
commit 8838472001
5 changed files with 166 additions and 14 deletions

View File

@@ -295,7 +295,12 @@ let
};
modules.reverse-proxy.routes.${machineName} = lib.mkIf cfg.reverseProxy.enable (
reverseProxyRoutes.routeFields cfg.reverseProxy
reverseProxyRoutes.routeFields (
cfg.reverseProxy
// lib.optionalAttrs (cfg.reverseProxy.backend == null && cfg.reverseProxy.endpoint == null) {
endpoint = "${config.networking.hostName}-${machineName}";
}
)
);
assertions = [