diff options
author | Soispha <soispha@vhack.eu> | 2023-07-27 10:12:00 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-27 10:12:00 +0200 |
commit | 911c3a166b08e2a6a4864980fa197b04cba83fa7 (patch) | |
tree | d2821f9e7b5f69856a3cb52dfff6b932e2ccdb1c | |
parent | Fix(system/services/matrix/bridges/m-wa): Correct postgresql uri (diff) | |
download | nixos-server-911c3a166b08e2a6a4864980fa197b04cba83fa7.tar.gz nixos-server-911c3a166b08e2a6a4864980fa197b04cba83fa7.zip |
Fix(system/services/matrix/bridges/m-wa): Use own database
-rw-r--r-- | system/services/matrix/default.nix | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/system/services/matrix/default.nix b/system/services/matrix/default.nix index b0219ef..ed3b567 100644 --- a/system/services/matrix/default.nix +++ b/system/services/matrix/default.nix @@ -20,11 +20,19 @@ in { services.postgresql.enable = true; services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" '' + --Matrix: CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse'; CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse" TEMPLATE template0 LC_COLLATE = "C" LC_CTYPE = "C"; + + --Whatsapp-bridge: + CREATE ROLE "mautrix-whatsapp" WITH LOGIN PASSWORD 'whatsapp'; + CREATE DATABASE "mautrix-whatsapp" WITH OWNER "mautrix-whatsapp" + TEMPLATE template0 + LC_COLLATE = "C" + LC_CTYPE = "C"; ''; services.nginx = { @@ -62,7 +70,7 @@ in { appservice = { database = { type = "postgres"; - uri = "postgres:///matrix-synapse?host=/run/postgresql"; + uri = "postgres:///mautrix-whatsapp?host=/run/postgresql"; }; whatsapp = { # TODO: See https://github.com/tulir/whatsmeow/blob/efc632c008604016ddde63bfcfca8de4e5304da9/binary/proto/def.proto#L43-L64 for a list. |