refactor(reverse-proxy): use route registry
This commit is contained in:
@@ -279,13 +279,8 @@ let
|
||||
|
||||
registry.address.${config.networking.hostName}.${machineName} = lib.mkIf (cfg.address != null) cfg.address;
|
||||
|
||||
modules.reverse-proxy.routes.${machineName} = lib.mkIf cfg.reverseProxy.enable (
|
||||
reverseProxyRoutes.routeFields (
|
||||
cfg.reverseProxy
|
||||
// lib.optionalAttrs (cfg.reverseProxy.backend == null && cfg.reverseProxy.endpoint == null) {
|
||||
endpoint = "${config.networking.hostName}-${machineName}";
|
||||
}
|
||||
)
|
||||
registry.route.${config.networking.hostName}.${machineName} = lib.mkIf cfg.reverseProxy.enable (
|
||||
reverseProxyRoutes.routeFields cfg.reverseProxy
|
||||
);
|
||||
|
||||
assertions = [
|
||||
|
||||
Reference in New Issue
Block a user