ingress-proxy: fix
This commit is contained in:
parent
f3e8b1a5bd
commit
dd2da578a9
1 changed files with 4 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
{ lib, pkgs, ... }: let
|
{ lib, pkgs, ... }: let
|
||||||
tsHost = x: "http://${x}.hoki-porgy.ts.net";
|
tsHost = name: port: "http://${name}.hoki-porgy.ts.net:${port}";
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
../../templates/proxmox-lxc.nix
|
../../templates/proxmox-lxc.nix
|
||||||
|
@ -18,16 +18,8 @@ in {
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
|
||||||
upstreams = with lib; let
|
upstreams = {
|
||||||
upstreamsToCreate = [
|
mango.servers = [ tsHost "mango" 6167 ];
|
||||||
tsHost "mango"
|
|
||||||
];
|
|
||||||
|
|
||||||
upstreams = listToAttrs (
|
|
||||||
map (x: nameValuePair x ({ servers = [x]; })) upstreamsToCreate
|
|
||||||
);
|
|
||||||
in {
|
|
||||||
inherit upstreams;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
@ -44,7 +36,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
locations."/_matrix/" = {
|
locations."/_matrix/" = {
|
||||||
proxyPass = "${tsHost "mango"}:6167";
|
proxyPass = "http://mango";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
|
Loading…
Add table
Reference in a new issue