summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-08-01 22:39:05 +0200
committerRory& <root@rory.gay>2024-08-01 22:39:23 +0200
commitfc822b65eb8cac8a6e3a63a40641d779b25af011 (patch)
treec1d41ef3133df81e6019d6c5529379764e13e3f5
parentServer changes (diff)
downloadRory-Open-Architecture-fc822b65eb8cac8a6e3a63a40641d779b25af011.tar.xz
Various changes
-rwxr-xr-x.gitignore1
-rw-r--r--host/Rory-desktop/configuration.nix2
-rwxr-xr-xhost/Rory-desktop/ollama.nix2
-rw-r--r--host/Rory-nginx/services/matrix/synapse/db.nix8
-rwxr-xr-xhost/Rory-nginx/services/matrix/synapse/synapse-main.nix8
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix7
-rw-r--r--host/Rory-nginx/services/matrix/synapse/workers/media-repo.nix7
-rw-r--r--modules/packages/nheko-git.nix2
8 files changed, 27 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 5377cec..2dfcba2 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 hardware-configuration.*
 secrets.nix
 .vscode/
+.idea/
 matrix-user-tokens.txt
 nixpkgs/
 result
diff --git a/host/Rory-desktop/configuration.nix b/host/Rory-desktop/configuration.nix
index 075e85e..929cab8 100644
--- a/host/Rory-desktop/configuration.nix
+++ b/host/Rory-desktop/configuration.nix
@@ -25,7 +25,7 @@ args@{
     ./optional/gui/wayland.nix
 
     #./printing.nix
-    ./ollama.nix
+    #./ollama.nix
   ];
 
   boot = {
diff --git a/host/Rory-desktop/ollama.nix b/host/Rory-desktop/ollama.nix
index bae196e..952203f 100755
--- a/host/Rory-desktop/ollama.nix
+++ b/host/Rory-desktop/ollama.nix
@@ -27,7 +27,7 @@
     environmentVariables = {
       OLLAMA_LLM_LIBRARY = "rocm";
     };
-    writablePaths = [ "/data/ollama/home" ];
+#    writablePaths = [ "/data/ollama/home" ];
     #listenAddress = "0.0.0.0:11434";
     host = "0.0.0.0";
     port = 11434;
diff --git a/host/Rory-nginx/services/matrix/synapse/db.nix b/host/Rory-nginx/services/matrix/synapse/db.nix
index d8dcde3..24c714e 100644
--- a/host/Rory-nginx/services/matrix/synapse/db.nix
+++ b/host/Rory-nginx/services/matrix/synapse/db.nix
@@ -11,7 +11,9 @@
     host = "/run/postgresql";
     application_name = "matrix-synapse (rory.gay) - ${if workerName == null then throw "synapse/db.nix: workerName unspecified" else workerName}";
     cp_min =
-      if dbGroup == "small" then
+      if dbGroup == "solo" then
+        1
+      else if dbGroup == "small" then
         2
       else if dbGroup == "medium" then
         5
@@ -20,7 +22,9 @@
       else
         throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
     cp_max =
-      if dbGroup == "small" then
+      if dbGroup == "solo" then
+        1
+      else if dbGroup == "small" then
         2
       else if dbGroup == "medium" then
         10
diff --git a/host/Rory-nginx/services/matrix/synapse/synapse-main.nix b/host/Rory-nginx/services/matrix/synapse/synapse-main.nix
index 761cb79..4f3256f 100755
--- a/host/Rory-nginx/services/matrix/synapse/synapse-main.nix
+++ b/host/Rory-nginx/services/matrix/synapse/synapse-main.nix
@@ -15,9 +15,9 @@
     withJemalloc = true;
 
     nginxVirtualHostName = "matrix.rory.gay";
-    federationSenders = 8;
-    pushers = 2;
-    mediaRepoWorkers = 8;
+    federationSenders = 16;
+    pushers = 1;
+    mediaRepoWorkers = 4;
     clientReaders = 4;
     syncWorkers = 4;
 
@@ -101,7 +101,7 @@
         "/var/lib/matrix-synapse/modas-registration.yaml"
       ];
 
-      max_image_pixels = "100M";
+      max_image_pixels = "250M";
 
       ui_auth = {
         session_timeout = "1m";
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix b/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
index 8238d1a..4cb137a 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/federation-sender.nix
@@ -23,6 +23,13 @@ in
       federation_sender_instances = lib.map (index: "federation_sender-${toString index}") federationSenders;
       outbound_federation_restricted_to = lib.map (index: "federation_sender-${toString index}") federationSenders;
       worker_replication_secret = "federation_sender_secret";
+
+      database = (
+        import ../db.nix {
+          workerName = "federation_sender";
+          dbGroup = "solo";
+        }
+      );
     };
 
     workers = lib.listToAttrs (
diff --git a/host/Rory-nginx/services/matrix/synapse/workers/media-repo.nix b/host/Rory-nginx/services/matrix/synapse/workers/media-repo.nix
index ec07eb0..e4d3b32 100644
--- a/host/Rory-nginx/services/matrix/synapse/workers/media-repo.nix
+++ b/host/Rory-nginx/services/matrix/synapse/workers/media-repo.nix
@@ -10,6 +10,8 @@ let
   workers = lib.range 0 (cfg.mediaRepoWorkers - 1);
   routes = [
     "~ ^/_matrix/media/"
+    "~ ^/_matrix/client/v1/media/"
+    "~ ^/_matrix/federation/v1/media/"
     "~ ^/_synapse/admin/v1/purge_media_cache$"
     "~ ^/_synapse/admin/v1/room/.*/media.*$"
     "~ ^/_synapse/admin/v1/user/.*/media.*$"
@@ -65,7 +67,7 @@ in
             database = (
               import ../db.nix {
                 workerName = "media_repo-${toString index}";
-                dbGroup = "small";
+                dbGroup = "solo";
               }
             );
             enable_media_repo = true;
@@ -93,6 +95,9 @@ in
         name = route;
         value = {
           proxyPass = "http://media_repo";
+          extraConfig = ''
+            client_max_body_size 500M;
+          '';
         };
       }) routes
     );
diff --git a/modules/packages/nheko-git.nix b/modules/packages/nheko-git.nix
index c38e622..c392d2f 100644
--- a/modules/packages/nheko-git.nix
+++ b/modules/packages/nheko-git.nix
@@ -74,7 +74,7 @@ stdenv.mkDerivation {
       [
         gstreamer
         gst-plugins-base
-        (gst-plugins-good.override { qt5Support = true; })
+        gst-plugins-good
         gst-plugins-bad
         libnice
       ]