summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-27 17:27:34 +0000
committerRory& <root@rory.gay>2026-02-27 17:27:34 +0000
commitc40300410cf2b9f2b3f8734c8d3455999fa7d3d1 (patch)
tree62595594ff0ad1e61b2e40917b5ee826e0db598d
parentLaptop changes (diff)
downloadRory-Open-Architecture-c40300410cf2b9f2b3f8734c8d3455999fa7d3d1.tar.xz
Server updates
-rw-r--r--flake.lock74
-rwxr-xr-xhost/Rory-ovh/configuration.nix3
-rw-r--r--host/Rory-ovh/services/containers/spacebar/container.nix5
-rw-r--r--host/Rory-ovh/services/containers/spacebar/root.nix2
-rw-r--r--host/Rory-ovh/services/containers/spacebar/services/spacebar.nix18
-rwxr-xr-xhost/Rory-ovh/services/nginx/nginx.nix1
-rw-r--r--host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix2
-rw-r--r--host/Rory-ovh/services/nginx/spacebar.chat/server/rory/voice.nix10
8 files changed, 85 insertions, 30 deletions
diff --git a/flake.lock b/flake.lock

index c68b3da..732070f 100644 --- a/flake.lock +++ b/flake.lock
@@ -300,11 +300,11 @@ "ffmpegSrc": { "flake": false, "locked": { - "lastModified": 1771901914, - "narHash": "sha256-OZTLVHGdM8L0D3DBqASAtXbCj/cyargFIMRM61hIlfk=", + "lastModified": 1771990023, + "narHash": "sha256-j8ZZ2Ze4HMuNiu+TWCxtdshjojQaS8QtuXSZDQn2/1c=", "ref": "refs/heads/master", - "rev": "186e388716dcfa29a5d7e4b53e732e7e74b4bb31", - "revCount": 122984, + "rev": "659892cda6767b1bcfe07933b20aadaef7f63150", + "revCount": 122993, "type": "git", "url": "https://git.ffmpeg.org/ffmpeg.git" }, @@ -1010,11 +1010,11 @@ "lix": { "flake": false, "locked": { - "lastModified": 1771888307, - "narHash": "sha256-yMoViM+9ffGn25A7gCKXKjKsW7EiOmSx4BWb2TjxVSk=", - "rev": "1ef7ccfc7242b25159ca17f2e0afe3ed8dc9a98e", + "lastModified": 1771958199, + "narHash": "sha256-Ly8FUEuz33GMGGLoGfMqB1cntxZ4Z5k/M87U1zkfTRc=", + "rev": "6182a5e659c24ce8f85c61a2203691d92563413e", "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/1ef7ccfc7242b25159ca17f2e0afe3ed8dc9a98e.tar.gz?rev=1ef7ccfc7242b25159ca17f2e0afe3ed8dc9a98e" + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/6182a5e659c24ce8f85c61a2203691d92563413e.tar.gz?rev=6182a5e659c24ce8f85c61a2203691d92563413e" }, "original": { "type": "tarball", @@ -1047,11 +1047,11 @@ "matrixSpecSrc": { "flake": false, "locked": { - "lastModified": 1771595517, - "narHash": "sha256-Dq5vaRGemkQu2NcIUV7b7SbtDm7jM7gy/B0eCgghSkU=", + "lastModified": 1771950955, + "narHash": "sha256-hTyfeCuFBw9JymZcdoqBaH0BkiQtESy+ig0rm5sibp4=", "owner": "matrix-org", "repo": "matrix-spec", - "rev": "f62aa09e607acfff13cbfa4e68c01d9ac9bddb76", + "rev": "be21886a73c82e08d54ea3a85cce0e0c720dce44", "type": "github" }, "original": { @@ -1208,11 +1208,11 @@ }, "nixpkgs-RoryNix": { "locked": { - "lastModified": 1771915923, - "narHash": "sha256-yyu8Shoa/IF4KaRk0hhb6BUL4m9fO7VMx5IHYtAqFfc=", + "lastModified": 1772006420, + "narHash": "sha256-tXq8/bXrZV9oaHf2yZEKDmjtsRZsAxUtVdmgakdOec0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1a778a1bf163fe2f9bcf863642065c3e3a78cab0", + "rev": "ffae6adc2949e03aeb150f0e2d216ce23ba5b33d", "type": "github" }, "original": { @@ -1224,11 +1224,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1771915923, - "narHash": "sha256-yyu8Shoa/IF4KaRk0hhb6BUL4m9fO7VMx5IHYtAqFfc=", + "lastModified": 1772006420, + "narHash": "sha256-tXq8/bXrZV9oaHf2yZEKDmjtsRZsAxUtVdmgakdOec0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1a778a1bf163fe2f9bcf863642065c3e3a78cab0", + "rev": "ffae6adc2949e03aeb150f0e2d216ce23ba5b33d", "type": "github" }, "original": { @@ -1320,11 +1320,11 @@ }, "nixpkgs_12": { "locked": { - "lastModified": 1771807909, - "narHash": "sha256-EIBJlDXxqYpmUDvZ/H13BZwRtMbaKqJYDbrYNGkKGfk=", + "lastModified": 1772001049, + "narHash": "sha256-W03sIIWi0tGCCVKjfuBwktvuKbXq10SwFDuhqQhoAm0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e2e54a67c07f3dcc70ffbb769dc5cb011a28fcc6", + "rev": "4e331cc3846f585943eb6f3eef9f00ace010e750", "type": "github" }, "original": { @@ -1502,6 +1502,31 @@ "url": "https://cgit.rory.gay/nix/OOYE-module.git" } }, + "pion-webrtc": { + "inputs": { + "flake-utils": [ + "spacebar", + "flake-utils" + ], + "nixpkgs": [ + "spacebar", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1772089711, + "narHash": "sha256-N4XQECQRWDirbf4mrZ0w5eCKPO5o2yNZv4LwW5SS4j0=", + "owner": "spacebarchat", + "repo": "pion-webrtc", + "rev": "d18098fd78687a2864ea8e696596d412889f9250", + "type": "github" + }, + "original": { + "owner": "spacebarchat", + "repo": "pion-webrtc", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_5", @@ -1627,14 +1652,15 @@ "spacebar": { "inputs": { "flake-utils": "flake-utils_7", - "nixpkgs": "nixpkgs_12" + "nixpkgs": "nixpkgs_12", + "pion-webrtc": "pion-webrtc" }, "locked": { - "lastModified": 1771831936, - "narHash": "sha256-mwXntftR14qB1DrxGGMPaZ8wR7k8YwyppEEY0uaZOcU=", + "lastModified": 1772203195, + "narHash": "sha256-WCcGnN+fdwC1cIwdORXrr3D81uKABdaT5NlIomMIbCE=", "owner": "spacebarchat", "repo": "server", - "rev": "785f53e7d1f485941e47f13f4558f9568571f9b0", + "rev": "ab4a8a31ec6825f865c40baa611b26e10a0b32c8", "type": "github" }, "original": { diff --git a/host/Rory-ovh/configuration.nix b/host/Rory-ovh/configuration.nix
index a73159a..0ea717d 100755 --- a/host/Rory-ovh/configuration.nix +++ b/host/Rory-ovh/configuration.nix
@@ -59,6 +59,9 @@ firewall.allowedTCPPorts = [ 25565 ]; + firewall.allowedUDPPorts = [ + 6000 # Spacebar voice + ]; }; systemd.network = { diff --git a/host/Rory-ovh/services/containers/spacebar/container.nix b/host/Rory-ovh/services/containers/spacebar/container.nix
index 164a3ec..e427abf 100644 --- a/host/Rory-ovh/services/containers/spacebar/container.nix +++ b/host/Rory-ovh/services/containers/spacebar/container.nix
@@ -27,6 +27,11 @@ hostPort = 30022; protocol = "tcp"; } + { + containerPort = 6000; + hostPort = 6000; + protocol = "udp"; + } ]; bindMounts."spacebar-storage" = { diff --git a/host/Rory-ovh/services/containers/spacebar/root.nix b/host/Rory-ovh/services/containers/spacebar/root.nix
index 67ecf09..da864d1 100644 --- a/host/Rory-ovh/services/containers/spacebar/root.nix +++ b/host/Rory-ovh/services/containers/spacebar/root.nix
@@ -18,6 +18,8 @@ 3003 3004 3005 + 3006 + 6000 ]; }; diff --git a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
index b96ac17..9c4020e 100644 --- a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix +++ b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
@@ -8,10 +8,13 @@ in services.spacebarchat-server = { enable = true; serverName = "spacebar.chat"; - adminApiEndpoint = sb.mkEndpoint "admin.rory.server.spacebar.chat" 3005 true; + apiEndpoint = sb.mkEndpoint "api.rory.server.spacebar.chat" 3001 true; gatewayEndpoint = sb.mkEndpoint "gateway.rory.server.spacebar.chat" 3002 true; 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; + cdnPath = "/storage"; cdnSignaturePath = "/run/secrets/spacebar/cdnSignature"; @@ -32,6 +35,11 @@ in extraConfiguration.ConnectionStrings.Spacebar = "Host=192.168.100.1; Username=spacebar; Password=spacebar; Database=spacebar; Port=5432; Include Error Detail=true; Maximum Pool Size=1000; Command Timeout=6000; Timeout=600;"; }; + pion-sfu = { + enable = true; + publicIp = "51.210.113.110"; + }; + settings = { security = { forwardedFor = "X-Forwarded-For"; @@ -184,10 +192,10 @@ in #LOG_PROTO_FRECENCY_UPDATES=true; #LOG_PROTO_SETTINGS_UPDATES=true; #WRTC_PUBLIC_IP=webrtc.old.server.spacebar.chat; - WRTC_PUBLIC_IP = "216.230.228.19"; - WRTC_PORT_MIN = 60000; - WRTC_PORT_MAX = 65000; - WRTC_LIBRARY = "@spacebarchat/medooze-webrtc"; + #WRTC_PUBLIC_IP = "216.230.228.19"; + #WRTC_PORT_MIN = 60000; + #WRTC_PORT_MAX = 65000; + #WRTC_LIBRARY = "@spacebarchat/medooze-webrtc"; #WRTC_LIBRARY=mediasoup-spacebar-wrtc; }; }; diff --git a/host/Rory-ovh/services/nginx/nginx.nix b/host/Rory-ovh/services/nginx/nginx.nix
index a644f77..235a1c0 100755 --- a/host/Rory-ovh/services/nginx/nginx.nix +++ b/host/Rory-ovh/services/nginx/nginx.nix
@@ -89,6 +89,7 @@ in "admin.rory.server.spacebar.chat" = import ./spacebar.chat/server/rory/admin.nix { inherit config; }; "api.rory.server.spacebar.chat" = import ./spacebar.chat/server/rory/api.nix { inherit config; }; "gateway.rory.server.spacebar.chat" = import ./spacebar.chat/server/rory/gateway.nix { inherit config; }; + "voice.rory.server.spacebar.chat" = import ./spacebar.chat/server/rory/voice.nix { inherit config; }; "cdn.rory.server.spacebar.chat" = import ./spacebar.chat/server/rory/cdn.nix { inherit config; }; # legacy "old.server.spacebar.chat" = import ./spacebar.chat/server/rory/root.nix { inherit config; }; diff --git a/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix
index 28bc2a9..df28a55 100644 --- a/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix +++ b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix
@@ -3,7 +3,7 @@ enableACME = !config.virtualisation.isVmVariant; addSSL = !config.virtualisation.isVmVariant; locations."/" = { - proxyPass = "http://192.168.100.22:3005"; + proxyPass = "http://192.168.100.22:3004"; extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; }; } diff --git a/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/voice.nix b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/voice.nix new file mode 100644
index 0000000..0dd40c9 --- /dev/null +++ b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/voice.nix
@@ -0,0 +1,10 @@ +{ config }: +{ + enableACME = !config.virtualisation.isVmVariant; + addSSL = !config.virtualisation.isVmVariant; + locations."/" = { + proxyPass = "http://192.168.100.22:3005"; + proxyWebsockets = true; + extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; + }; +}