ingress-proxy: fix

This commit is contained in:
41666 2023-12-29 20:27:36 -05:00
parent f3e8b1a5bd
commit dd2da578a9

View file

@ -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;