From 1956c75a61f8697a26737720bdb8a771347f4f3a Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 20 Jan 2024 04:51:10 +0000 Subject: [PATCH] centroid: add lan revproxy --- machine/centroid/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/machine/centroid/default.nix b/machine/centroid/default.nix index 7c73c67..f74b080 100644 --- a/machine/centroid/default.nix +++ b/machine/centroid/default.nix @@ -62,5 +62,24 @@ ''; }; + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts = { + default = { + default = true; + locations."/".return = "444"; + }; + "centroid.lan" = { + listen = [ { addr = "centroid.lan"; } ]; + locations."/" = { + proxyWebsockets = true; + proxyPass = "http://localhost:6680"; + }; + }; + }; + }; + networking.firewall.allowedTCPPorts = [ 80 ]; + system.stateVersion = "23.11"; }