services: matrix: make sure db and role exist
This commit is contained in:
parent
9593e8b460
commit
82624606db
|
@ -53,6 +53,14 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
ensureDatabases = ["matrix-synapse"];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "matrix-synapse";
|
||||||
|
ensurePermissions."DATABASE 'matrix-synapse'" = "ALL PRIVILEGES";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
|
|
Loading…
Reference in a new issue