diff options
Diffstat (limited to 'host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix')
-rwxr-xr-x | host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix b/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix index 9cb8d92..675e861 100755 --- a/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix +++ b/host/Spacebar-nginx/containers/spacebar-server-dev-nix/services/nginx.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, spacebar-server, ... }: +{ config, pkgs, lib, spacebar-server, rootDomain ... }: { services = { @@ -25,18 +25,18 @@ moreheaders ]; virtualHosts = { - "dev-nix.server.spacebar.chat" = { + "${rootDomain}" = { locations."= /.well-known/spacebarchat/client".extraConfig = '' more_set_headers 'Content-Type application/json'; more_set_headers 'Access-Control-Allow-Origin *'; return 200 '${builtins.toJSON { - cdn = "cdn.dev-nix.server.spacebar.chat"; - gateway = "gateway.dev-nix.server.spacebar.chat"; - api = "api.dev-nix.server.spacebar.chat"; + cdn = "cdn.${rootDomain}"; + gateway = "gateway.${rootDomain}"; + api = "api.${rootDomain}"; }}'; ''; }; - "api.dev-nix.server.spacebar.chat" = { + "api.${rootDomain}" = { locations."/" = { proxyPass = "http://127.0.0.1:3001"; extraConfig = '' @@ -58,7 +58,7 @@ ''; }; }; - "cdn.dev-nix.server.spacebar.chat" = { + "cdn.${rootDomain}" = { locations."/" = { proxyPass = "http://127.0.0.1:3003"; extraConfig = '' @@ -80,7 +80,7 @@ ''; }; }; - "gateway.dev-nix.server.spacebar.chat" = { + "gateway.${rootDomain}" = { locations."/" = { proxyPass = "http://127.0.0.1:3002"; extraConfig = '' @@ -105,11 +105,10 @@ }; }; }; + systemd.services.nginx.serviceConfig = { LimitNOFILE=5000000; }; - security.acme.acceptTerms = true; - security.acme.defaults.email = "root@rory.gay"; system.stateVersion = "22.11"; # DO NOT EDIT! } |