diff options
author | Ben Sima <ben@bsima.me> | 2019-05-13 17:37:27 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-05-13 17:37:27 -0700 |
commit | bd4e4dfefd73ed578be8bdac3b1fda6f21482979 (patch) | |
tree | 1a3e59d184aa5d2a1b0f8f905878cea8ede36fab /depo/nutin-madaj/web.nix | |
parent | 45f72cbf8ac58a8dd528c656482356c0933ed61f (diff) |
refactor nutin-madaj nix code
Diffstat (limited to 'depo/nutin-madaj/web.nix')
-rw-r--r-- | depo/nutin-madaj/web.nix | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/depo/nutin-madaj/web.nix b/depo/nutin-madaj/web.nix new file mode 100644 index 0000000..d14a2c7 --- /dev/null +++ b/depo/nutin-madaj/web.nix @@ -0,0 +1,39 @@ +{ ... }: + +let + bensIp = "68.107.97.20"; # hiddor-kahih +in +{ + services = { + nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + # "bsima.me".locations."/".proxyPass = "http://localhost:8000/~ben"; + "simatime.com".locations."/".proxyPass = "http://localhost:8000"; + "web.simatime.com".locations."/".proxyPass = "http://${bensIp}:8000"; + "hero.simatime.com".locations."/".proxyPass = "http://${bensIp}:3001"; + "tv.simatime.com".locations."/".proxyPass = "http://${bensIp}:8096"; # emby runs on port 8096 + + "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; + }; + }; + }; + }; + }; +} |