about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-28 15:10:27 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-11-28 15:10:27 +0900
commit3cddfd29bcac6705fd6904844b8ea7649ee5ca2a (patch)
tree7dfea000d88c51beec5b4c96da00996532a0c835
parent35d35cfcf1f1cfd0dd054ce0355943540bf8ebbe (diff)
downloadnixos-conf-3cddfd29bcac6705fd6904844b8ea7649ee5ca2a.tar.gz
Config global db conn for Dendrite
-rw-r--r--matrix.nix35
1 files changed, 18 insertions, 17 deletions
diff --git a/matrix.nix b/matrix.nix
index 6c1d057..24dc1e9 100644
--- a/matrix.nix
+++ b/matrix.nix
@@ -35,33 +35,34 @@ in {
   services = {
     dendrite = {
       enable = true;
-      settings = let
-        dburl = "postgres:///dendrite?host=/run/postgresql";
-        workingDir = "/var/lib/dendrite"; # hardcoded in service
+      settings = let workingDir = "/var/lib/dendrite"; # hardcoded in service
       in {
-        app_service_api.database.connection_string = dburl;
-        federation_api.database.connection_string = dburl;
+        app_service_api.database.connection_string = "";
+        federation_api.database.connection_string = "";
         global = {
-          server_name = domain;
+          database = {
+            connection_string = "postgres:///dendrite?host=/run/postgresql";
+            max_open_conns = 90;
+          };
           private_key = "${workingDir}/matrix_key.pem";
+          server_name = domain;
           trusted_third_party_id_servers = [ ];
         };
-        key_server.database.connection_string = dburl;
-        media_api = {
-          database.connection_string = dburl;
-          max_file_size_bytes = 0;
-        };
+        key_server.database.connection_string = "";
+        media_api.database.connection_string = "";
         mscs = {
-          database.connection_string = dburl;
+          database.connection_string = "";
           mscs = [ "msc2946" ]; # spaces summary
         };
-        room_server.database.connection_string = dburl;
+        room_server.database.connection_string = "";
         sync_api = {
-          database.connection_string = dburl;
-          search.enable = true;
+          database.connection_string = "";
+          search.enabled = true;
+        };
+        user_api = {
+          account_database.connection_string = "";
+          device_database.connection_string = "";
         };
-        user_api.account_database.connection_string = dburl;
-        user_api.device_database.connection_string = dburl;
       };
     };