From c790672cc244ac4caba1bda3572829a6c6862891 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 27 Oct 2019 09:48:52 -0700 Subject: move everything to namespace directories --- com/simatime/web.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 com/simatime/web.nix (limited to 'com/simatime/web.nix') diff --git a/com/simatime/web.nix b/com/simatime/web.nix new file mode 100644 index 0000000..d6be348 --- /dev/null +++ b/com/simatime/web.nix @@ -0,0 +1,41 @@ +{ ... }: + +let + bensIp = "69.181.254.154"; # hikuj-zupip +in +{ + services = { + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "bsima.me".root = "/home/ben/public_html/"; + "www.bsima.me".root = "/home/ben/public_html/"; + "simatime.com".locations."/".root = "/srv/www/"; + "firefoxsync.simatime.com".locations."/".proxyPass = "http://localhost:5001"; + "hero.simatime.com".locations."/".proxyPass = "http://${bensIp}:3001"; + "tv.simatime.com".locations."/".proxyPass = "http://${bensIp}:8096"; # emby runs on port 8096 + "deluge.simatime.com".locations."/".proxyPass = "http://${bensIp}:8112"; + + "notebook.simatime.com".locations = { + "/" = { + proxyPass = "http://${bensIp}:3099"; + proxyWebsockets = true; + extraConfig = '' + proxy_buffering off; + proxy_read_timeout 86400; + + ''; + }; + "/(api/kernels/[^/]+/channels|terminals/websocket)/" = { + proxyPass = "http://${bensIp}:3099"; + proxyWebsockets = true; + }; + }; + }; + }; + }; +} -- cgit v1.2.3