diff options
Diffstat (limited to 'host/Spacebar-nginx/nginx-hosts/spacebar.chat')
7 files changed, 104 insertions, 0 deletions
diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/grafana.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/grafana.nix new file mode 100755 index 0000000..d2b7207 --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/grafana.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.99:3000"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/internal/secrets.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/internal/secrets.nix new file mode 100644 index 0000000..cc0e299 --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/internal/secrets.nix @@ -0,0 +1,20 @@ +{ lib, config }: { + root = "/data/nginx/secrets"; + #use ip from ens18 + listenAddresses = [ + (lib.head config.networking.interfaces.ens18.ipv4.addresses).address + ]; + locations = { + "/" = { + extraConfig = + "autoindex on;" + + "allow 192.168.1.0/24;" + + "allow 127.0.0.1;" + + "deny all;" + ; + }; + "^~ /.well-known/acme-challenge/" = { + root = "/var/lib/acme/acme-challenge"; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/mail.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/mail.nix new file mode 100755 index 0000000..3ca873d --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/mail.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.3"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/api.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/api.nix new file mode 100755 index 0000000..8b7df6d --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/api.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.200:3001"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/cdn.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/cdn.nix new file mode 100755 index 0000000..89958fe --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/cdn.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.200:3003"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/gateway.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/gateway.nix new file mode 100755 index 0000000..ff95a5e --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/gateway.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.200:3002"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} diff --git a/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/root.nix b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/root.nix new file mode 100755 index 0000000..8b7df6d --- /dev/null +++ b/host/Spacebar-nginx/nginx-hosts/spacebar.chat/server/old/root.nix @@ -0,0 +1,14 @@ +{ + enableACME = true; + forceSSL = true; + locations = { + "/" = { + proxyPass = "http://192.168.1.200:3001"; + proxyWebsockets = true; + extraConfig = + "proxy_ssl_server_name on;" + + "proxy_pass_header Authorization;" + ; + }; + }; +} |