diff --git a/services/matrix.nix b/services/matrix.nix index e0ca675..f09fc9f 100644 --- a/services/matrix.nix +++ b/services/matrix.nix @@ -53,6 +53,14 @@ in { config = mkIf cfg.enable { services.postgresql = { enable = true; + + ensureDatabases = ["matrix-synapse"]; + ensureUsers = [ + { + name = "matrix-synapse"; + ensurePermissions."DATABASE \"matrix-synapse\"" = "ALL PRIVILEGES"; + } + ]; }; services.postgresqlBackup = {