summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/matrix/default.nix10
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.