diff --git a/nixos/hosts/ingress-proxy/default.nix b/nixos/hosts/ingress-proxy/default.nix index 01dfcc2..7475656 100644 --- a/nixos/hosts/ingress-proxy/default.nix +++ b/nixos/hosts/ingress-proxy/default.nix @@ -1,5 +1,5 @@ { lib, pkgs, ... }: let - tsHost = x: "http://${x}.hoki-porgy.ts.net"; + tsHost = name: port: "http://${name}.hoki-porgy.ts.net:${port}"; in { imports = [ ../../templates/proxmox-lxc.nix @@ -18,16 +18,8 @@ in { services.nginx = { recommendedTlsSettings = true; - upstreams = with lib; let - upstreamsToCreate = [ - tsHost "mango" - ]; - - upstreams = listToAttrs ( - map (x: nameValuePair x ({ servers = [x]; })) upstreamsToCreate - ); - in { - inherit upstreams; + upstreams = { + mango.servers = [ tsHost "mango" 6167 ]; }; virtualHosts = { @@ -44,7 +36,7 @@ in { ]; locations."/_matrix/" = { - proxyPass = "${tsHost "mango"}:6167"; + proxyPass = "http://mango"; proxyWebsockets = true; extraConfig = '' proxy_set_header Host $host;