services: matrix: make sure db and role exist

This commit is contained in:
Antoine Martin 2022-06-12 21:00:36 +02:00
parent 9593e8b460
commit d95a25c61f

View file

@ -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 = {