diff --git a/nixos/hosts/ingress-proxy/default.nix b/nixos/hosts/ingress-proxy/default.nix index 0cb0cd3..da0081c 100644 --- a/nixos/hosts/ingress-proxy/default.nix +++ b/nixos/hosts/ingress-proxy/default.nix @@ -20,16 +20,17 @@ in { recommendedTlsSettings = true; upstreams = { - mango.servers."${tsHost "mango" 6167}" = {}; - hsb.servers."${tsHost "happystaticbuzz" 8080}" = {}; - ks.servers."${tsHost "keysmash" 8080}" = {}; ps2l_saerro.servers."${tsHost "ps2live" 8101}" = {}; ps2l_aggpop.servers."${tsHost "ps2live" 8201}" = {}; ps2l_metagame.servers."${tsHost "ps2live" 8301}" = {}; }; virtualHosts = let - defaultConfig = { + defaultConfig = { + listen = [ + { addr = "0.0.0.0"; port = 443; ssl = true; } + { addr = "[::]"; port = 443; ssl = true; } + ]; http2 = true; http3 = true; forceSSL = lib.mkDefault true; @@ -59,49 +60,49 @@ in { } // defaultConfig; in { # Matrix (main) - "mx.sapphic.engineer" = defaultConfig // { - listen = [ - { addr = "0.0.0.0"; port = 443; ssl = true; } - { addr = "[::]"; port = 443; ssl = true; } - { addr = "0.0.0.0"; port = 8448; ssl = true; } - { addr = "[::]"; port = 8448; ssl = true; } - ]; + # "mx.sapphic.engineer" = defaultConfig // { + # listen = [ + # { addr = "0.0.0.0"; port = 443; ssl = true; } + # { addr = "[::]"; port = 443; ssl = true; } + # { addr = "0.0.0.0"; port = 8448; ssl = true; } + # { addr = "[::]"; port = 8448; ssl = true; } + # ]; - locations."/_matrix/" = { - proxyPass = "http://mango"; - proxyWebsockets = true; - extraConfig = '' - proxy_set_header Host $host; - proxy_buffering off; - ''; - }; + # locations."/_matrix/" = { + # proxyPass = "http://mango"; + # proxyWebsockets = true; + # extraConfig = '' + # proxy_set_header Host $host; + # proxy_buffering off; + # ''; + # }; - extraConfig = '' - merge_slashes off; - client_max_body_size 100M; - ''; - }; + # extraConfig = '' + # merge_slashes off; + # client_max_body_size 100M; + # ''; + # }; - "happ.ystatic.buzz" = defaultConfig // { - locations."/" = { - proxyPass = "http://hsb"; - proxyWebsockets = true; - }; - extraConfig = '' - client_max_body_size 40M; - ''; - }; + # "happ.ystatic.buzz" = defaultConfig // { + # locations."/" = { + # proxyPass = "http://hsb"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # client_max_body_size 40M; + # ''; + # }; - "keysmash.xn--q9jyb4c" = defaultConfig // { - locations."/" = { - proxyPass = "http://ks"; - proxyWebsockets = true; - }; + # "keysmash.xn--q9jyb4c" = defaultConfig // { + # locations."/" = { + # proxyPass = "http://ks"; + # proxyWebsockets = true; + # }; - extraConfig = '' - client_max_body_size 40M; - ''; - }; + # extraConfig = '' + # client_max_body_size 40M; + # ''; + # }; "mekanoe.com" = mekanoesh; @@ -123,32 +124,32 @@ in { }; # Generic store for /.well-known/ paths. - "well-known.sapphic.engineer" = defaultConfig // { - locations."=/.well-known/matrix/server" = let - alias = pkgs.writeText "well-known-matrix-server" (builtins.toJSON { - "m.server" = "mx.sapphic.engineer"; - }); - in { - alias = "${alias}"; - extraConfig = '' - default_type application/json; - ''; - }; + # "well-known.sapphic.engineer" = defaultConfig // { + # locations."=/.well-known/matrix/server" = let + # alias = pkgs.writeText "well-known-matrix-server" (builtins.toJSON { + # "m.server" = "mx.sapphic.engineer"; + # }); + # in { + # alias = "${alias}"; + # extraConfig = '' + # default_type application/json; + # ''; + # }; - locations."=/.well-known/matrix/client" = let - alias = pkgs.writeText "well-known-matrix-client" (builtins.toJSON { - "m.homeserver" = { - base_url = "https://mx.sapphic.engineer"; - }; - }); - in { - alias = "${alias}"; - extraConfig = '' - default_type application/json; - add_header Access-Control-Allow-Origin "*"; - ''; - }; - }; + # locations."=/.well-known/matrix/client" = let + # alias = pkgs.writeText "well-known-matrix-client" (builtins.toJSON { + # "m.homeserver" = { + # base_url = "https://mx.sapphic.engineer"; + # }; + # }); + # in { + # alias = "${alias}"; + # extraConfig = '' + # default_type application/json; + # add_header Access-Control-Allow-Origin "*"; + # ''; + # }; + # }; }; };