summary refs log tree commit diff
path: root/host/Rory-nginx/services/matrix/synapse/db.nix
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-07-04 14:59:36 +0200
committerRory& <root@rory.gay>2024-07-04 14:59:36 +0200
commitdd7b872694441a96b8b042ccbc4b63a96d0b89b9 (patch)
tree76a25875e08415c38cdb7b5ad8f93241b387d078 /host/Rory-nginx/services/matrix/synapse/db.nix
parentUpdate flake inputs (diff)
downloadRory-Open-Architecture-dd7b872694441a96b8b042ccbc4b63a96d0b89b9.tar.xz
Nixfmt
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/db.nix')
-rw-r--r--host/Rory-nginx/services/matrix/synapse/db.nix35
1 files changed, 23 insertions, 12 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/db.nix b/host/Rory-nginx/services/matrix/synapse/db.nix
index c5edc51..d8dcde3 100644
--- a/host/Rory-nginx/services/matrix/synapse/db.nix
+++ b/host/Rory-nginx/services/matrix/synapse/db.nix
@@ -1,7 +1,8 @@
-{ 
+{
   workerName ? null,
-  dbGroup ? null
-}: {
+  dbGroup ? null,
+}:
+{
   name = "psycopg2";
   args = {
     user = "matrix-synapse-rory-gay";
@@ -9,13 +10,23 @@
     database = "matrix-synapse-rory-gay";
     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 2
-      else if dbGroup == "medium" then 5
-      else if dbGroup == "large" then 10
-      else throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
-    cp_max = if dbGroup == "small" then 2
-      else if dbGroup == "medium" then 10
-      else if dbGroup == "large" then 10
-      else throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
+    cp_min =
+      if dbGroup == "small" then
+        2
+      else if dbGroup == "medium" then
+        5
+      else if dbGroup == "large" then
+        10
+      else
+        throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
+    cp_max =
+      if dbGroup == "small" then
+        2
+      else if dbGroup == "medium" then
+        10
+      else if dbGroup == "large" then
+        10
+      else
+        throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
   };
-}
\ No newline at end of file
+}