diff options
author | Rory& <root@rory.gay> | 2024-06-27 15:02:25 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-04 14:45:02 +0200 |
commit | e6813744cdedcd157c2c8835a9a5e0649579bcb8 (patch) | |
tree | a074d44914cd962a1f1ecabf9dd34a58a29db2f1 /host/Rory-nginx/services/matrix/synapse/db.nix | |
parent | Use postgres sockets for synapse (diff) | |
download | Rory-Open-Architecture-e6813744cdedcd157c2c8835a9a5e0649579bcb8.tar.xz |
Split up synapse config
Diffstat (limited to 'host/Rory-nginx/services/matrix/synapse/db.nix')
-rw-r--r-- | host/Rory-nginx/services/matrix/synapse/db.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/host/Rory-nginx/services/matrix/synapse/db.nix b/host/Rory-nginx/services/matrix/synapse/db.nix new file mode 100644 index 0000000..c5edc51 --- /dev/null +++ b/host/Rory-nginx/services/matrix/synapse/db.nix @@ -0,0 +1,21 @@ +{ + workerName ? null, + dbGroup ? null +}: { + name = "psycopg2"; + args = { + user = "matrix-synapse-rory-gay"; + password = "somepassword"; + 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}"; + }; +} \ No newline at end of file |