summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-16 04:23:08 +0100
committerRory& <root@rory.gay>2026-02-16 04:23:08 +0100
commit5408958c9625a0f0f73225429322a463efebbf4a (patch)
tree890750ca2e9a89c804d22a8492e06123d7c45ca8
parentUpdate packages (diff)
downloadRory-Open-Architecture-5408958c9625a0f0f73225429322a463efebbf4a.tar.xz
Add spacebar admin api
-rwxr-xr-xflake.nix11
-rw-r--r--host/Rory-ovh/services/containers/spacebar/services/spacebar.nix6
-rw-r--r--host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix9
3 files changed, 26 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix

index fba3baf..ae6ef45 100755 --- a/flake.nix +++ b/flake.nix
@@ -482,6 +482,17 @@ patches = []; }); + packages.openrgb-3200 = self.inputs.nixpkgs-master.legacyPackages.${system}.openrgb.overrideAttrs (oldAttrs: rec { + src = pkgs.fetchFromGitLab { + owner = "CalcProgrammer1"; + repo = "OpenRGB"; + rev = "2b7b1b4ddb3db3104a7021dbcf44a2a6b24c0f7c"; + hash = "sha256-tQt9Ej04GTYAcHeAwwvD4Idn+5FcZxRjdgMOMjvQj1E="; + }; + version = "git"; + patches = []; + }); + packages.draupnir = (self.inputs.nixpkgs-override-draupnir or self.inputs.nixpkgs-master).legacyPackages.${system}.draupnir; # packages.jetbrains = (self.inputs.jetbrains or self.inputs.nixpkgs).legacyPackages.${system}.jetbrains; diff --git a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
index 807caad..ec2767f 100644 --- a/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix +++ b/host/Rory-ovh/services/containers/spacebar/services/spacebar.nix
@@ -8,6 +8,7 @@ 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; @@ -26,6 +27,11 @@ in ipdataApiKeyPath = "/run/secrets/spacebar/ipdataApiKey"; requestSignaturePath = "/run/secrets/spacebar/requestSignature"; + adminApi = { + enable = true; + 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;"; + }; + settings = { security = { forwardedFor = "X-Forwarded-For"; 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 new file mode 100644
index 0000000..28bc2a9 --- /dev/null +++ b/host/Rory-ovh/services/nginx/spacebar.chat/server/rory/admin.nix
@@ -0,0 +1,9 @@ +{ config }: +{ + enableACME = !config.virtualisation.isVmVariant; + addSSL = !config.virtualisation.isVmVariant; + locations."/" = { + proxyPass = "http://192.168.100.22:3005"; + extraConfig = "proxy_ssl_server_name on;" + "proxy_pass_header Authorization;"; + }; +}