From ee6b977a973f53bc998ee78ce2362bed2e0de238 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Sat, 13 May 2023 20:37:30 +0200 Subject: [PATCH] Add more databases to the matrix postgres Signed-off-by: Magic_RB --- containers/conduit.nix | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/containers/conduit.nix b/containers/conduit.nix index b5d3234..cad213a 100644 --- a/containers/conduit.nix +++ b/containers/conduit.nix @@ -122,12 +122,34 @@ in authentication = "host all all all md5"; - ensureDatabases = { "synapse" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; }; + ensureDatabases = { + "synapse" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; + "mautrix-facebook" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; + "mautrix-signal" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; + "mautrix-whatsapp" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; + "mautrix-discord" = { ENCODING = "UTF8"; TEMPLATE = "template0"; }; + }; ensureExtensions = {}; ensureUsers = [ - { name = "synapse"; ensurePermissions = { - "DATABASE \"synapse\"" = "ALL PRIVILEGES"; - }; + { + name = "synapse"; + ensurePermissions."DATABASE \"synapse\"" = "ALL PRIVILEGES"; + } + { + name = "mautrix-facebook"; + ensurePermissions."DATABASE \"mautrix-facebook\"" = "ALL PRIVILEGES"; + } + { + name = "mautrix-signal"; + ensurePermissions."DATABASE \"mautrix-signal\"" = "ALL PRIVILEGES"; + } + { + name = "mautrix-whatsapp"; + ensurePermissions."DATABASE \"mautrix-whatsapp\"" = "ALL PRIVILEGES"; + } + { + name = "mautrix-discord"; + ensurePermissions."DATABASE \"mautrix-discord\"" = "ALL PRIVILEGES"; } ]; };