renamed proxyreversearr > proxyreversefix
This commit is contained in:
parent
13ffe469a5
commit
5a92a8c996
@ -34,7 +34,7 @@
|
|||||||
chromium # web browser with spyware included
|
chromium # web browser with spyware included
|
||||||
telegram-desktop # furry chat
|
telegram-desktop # furry chat
|
||||||
nicotine-plus # remember Ares?
|
nicotine-plus # remember Ares?
|
||||||
webcord # screen share with audio discord
|
# webcord # screen share with audio discord
|
||||||
discord-ptb # :3
|
discord-ptb # :3
|
||||||
teamspeak5_client # ppl say they will use this...?
|
teamspeak5_client # ppl say they will use this...?
|
||||||
# hugo # website engine
|
# hugo # website engine
|
||||||
|
|||||||
@ -31,7 +31,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||||
setup.proxyReverseArr cfg.hostName cfg.port // { }
|
setup.proxyReverseFix cfg.hostName cfg.port // { }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -33,7 +33,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
services.nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||||
setup.proxyReverseArr cfg.hostName cfg.port // { }
|
setup.proxyReverseFix cfg.hostName cfg.port // { }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,7 +18,7 @@ in
|
|||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||||
setup.proxyReverseArr cfg.hostName cfg.port // { }
|
setup.proxyReverseFix cfg.hostName cfg.port // { }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -13,7 +13,7 @@ in
|
|||||||
group = "piracy";
|
group = "piracy";
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||||
setup.proxyReverseArr cfg.hostName cfg.port // { }
|
setup.proxyReverseFix cfg.hostName cfg.port // { }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@ -54,7 +54,7 @@ let
|
|||||||
proxyTarget = if useLocalhost then config.my.localhost else config.my.ips."${host}";
|
proxyTarget = if useLocalhost then config.my.localhost else config.my.ips."${host}";
|
||||||
in
|
in
|
||||||
proxy { "/".proxyPass = "http://${proxyTarget}:${toString port}/"; };
|
proxy { "/".proxyPass = "http://${proxyTarget}:${toString port}/"; };
|
||||||
proxyReverseArr =
|
proxyReverseFix =
|
||||||
host: port:
|
host: port:
|
||||||
let
|
let
|
||||||
useLocalhost = host == config.networking.hostName;
|
useLocalhost = host == config.networking.hostName;
|
||||||
@ -84,6 +84,6 @@ in
|
|||||||
mkOptions
|
mkOptions
|
||||||
proxy
|
proxy
|
||||||
proxyReverse
|
proxyReverse
|
||||||
proxyReverseArr
|
proxyReverseFix
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ in
|
|||||||
group = "piracy";
|
group = "piracy";
|
||||||
};
|
};
|
||||||
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (
|
||||||
setup.proxyReverseArr cfg.hostName cfg.port // { }
|
setup.proxyReverseFix cfg.hostName cfg.port // { }
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user