summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-03-12 00:50:31 +0100
committerRory& <root@rory.gay>2026-03-12 00:50:31 +0100
commitc94743c23f6ac9dc82fac251e5db4c1572b08fb0 (patch)
treea16f99d16553879733dd0a8fd6e52dc929e00cb6
parentaspiretc705 (diff)
downloadRory-Open-Architecture-master.tar.xz
Spacebar gateway sharding HEAD master
-rwxr-xr-xflake.nix18
-rw-r--r--host/Rory-ovh/services/containers/spacebar/root.nix4
-rw-r--r--host/Rory-ovh/services/containers/spacebar/services/spacebar.nix3
-rwxr-xr-xhost/Rory-ovh/services/nginx/nginx.nix24
-rw-r--r--host/Rory-ovh/services/nginx/spacebar.chat/server/old/gateway.nix2
-rw-r--r--host/Rory-ovh/services/nginx/spacebar.chat/server/rory/gateway.nix2
6 files changed, 39 insertions, 14 deletions
diff --git a/flake.nix b/flake.nix

index 451fb86..fa16501 100755 --- a/flake.nix +++ b/flake.nix
@@ -106,10 +106,10 @@ flake = false; }; - ffmpegSrc = { - url = "git+https://git.ffmpeg.org/ffmpeg.git"; - flake = false; - }; + #ffmpegSrc = { + # url = "git+https://git.ffmpeg.org/ffmpeg.git"; + # flake = false; + #}; draupnirSrc = { url = "github:the-draupnir-project/Draupnir/main"; @@ -505,11 +505,11 @@ ''; }); - packages.ffmpeg-git = self.inputs.nixpkgs-master.legacyPackages.${system}.ffmpeg-full.overrideAttrs (oldAttrs: rec { - src = ffmpegSrc; - version = "git"; - patches = []; - }); + #packages.ffmpeg-git = self.inputs.nixpkgs-master.legacyPackages.${system}.ffmpeg-full.overrideAttrs (oldAttrs: rec { + # src = ffmpegSrc; + # version = "git"; + # patches = []; + #}); packages.openrgb-3200 = self.inputs.nixpkgs-master.legacyPackages.${system}.openrgb.overrideAttrs (oldAttrs: rec { src = pkgs.fetchFromGitLab { diff --git a/host/Rory-ovh/services/containers/spacebar/root.nix b/host/Rory-ovh/services/containers/spacebar/root.nix
index da864d1..266f3c8 100644 --- a/host/Rory-ovh/services/containers/spacebar/root.nix +++ b/host/Rory-ovh/services/containers/spacebar/root.nix
@@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, ... }: { networking.useHostResolvConf = true; @@ -20,7 +20,7 @@ 3005 3006 6000 - ]; + ] ++ (lib.range 3100 3115); }; services.openssh = { diff --git a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
index 9c4020e..a7a41b2 100644 --- a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix +++ b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
@@ -1,4 +1,4 @@ -{ spacebar, ... }: +{ spacebar, lib, ... }: let sb = import "${spacebar}/nix/modules/default/lib.nix"; @@ -11,6 +11,7 @@ in apiEndpoint = sb.mkEndpoint "api.rory.server.spacebar.chat" 3001 true; gatewayEndpoint = sb.mkEndpoint "gateway.rory.server.spacebar.chat" 3002 true; + extraGatewayPorts = lib.range 3100 3115; cdnEndpoint = sb.mkEndpoint "cdn.rory.server.spacebar.chat" 3003 true; adminApiEndpoint = sb.mkEndpoint "admin.rory.server.spacebar.chat" 3004 true; webrtcEndpoint = sb.mkEndpoint "voice.rory.server.spacebar.chat" 3005 true; diff --git a/host/Rory-ovh/services/nginx/nginx.nix b/host/Rory-ovh/services/nginx/nginx.nix
index 235a1c0..2d9847b 100755 --- a/host/Rory-ovh/services/nginx/nginx.nix +++ b/host/Rory-ovh/services/nginx/nginx.nix
@@ -36,6 +36,30 @@ in access_log /var/log/nginx/access.log combined_vhosts; ''; additionalModules = with pkgs.nginxModules; [ moreheaders ]; + + upstreams."spacebar-gateway" = { + servers = { + # main + "192.168.100.22:3002" = {}; + # extraPorts + "192.168.100.22:3100" = {}; + "192.168.100.22:3101" = {}; + "192.168.100.22:3102" = {}; + "192.168.100.22:3103" = {}; + "192.168.100.22:3104" = {}; + "192.168.100.22:3105" = {}; + "192.168.100.22:3106" = {}; + "192.168.100.22:3107" = {}; + "192.168.100.22:3108" = {}; + "192.168.100.22:3109" = {}; + "192.168.100.22:3110" = {}; + "192.168.100.22:3111" = {}; + "192.168.100.22:3112" = {}; + "192.168.100.22:3113" = {}; + "192.168.100.22:3114" = {}; + "192.168.100.22:3115" = {}; + }; + }; virtualHosts = { #"boorunav.com" = serveDir { path = "/data/nginx/html_boorunav"; }; # "catgirlsaresexy.com" = serveDir { path = "/data/nginx/html_catgirlsaresexy"; }; diff --git a/host/Rory-ovh/services/nginx/spacebar.chat/server/old/gateway.nix b/host/Rory-ovh/services/nginx/spacebar.chat/server/old/gateway.nix
index ff95a5e..391d372 100644 --- a/host/Rory-ovh/services/nginx/spacebar.chat/server/old/gateway.nix +++ b/host/Rory-ovh/services/nginx/spacebar.chat/server/old/gateway.nix
@@ -3,7 +3,7 @@ forceSSL = true; locations = { "/" = { - proxyPass = "http://192.168.1.200:3002"; + proxyPass = "http://spacebar-gateway"; proxyWebsockets = true; extraConfig = "proxy_ssl_server_name on;" + diff --git a/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/gateway.nix b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/gateway.nix
index 88a37da..18c66fa 100644 --- a/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/gateway.nix +++ b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/gateway.nix
@@ -3,7 +3,7 @@ enableACME = !config.virtualisation.isVmVariant; addSSL = !config.virtualisation.isVmVariant; locations."/" = { - proxyPass = "http://192.168.100.22:3002"; + proxyPass = "http://spacebar-gateway"; proxyWebsockets = true; extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; };