services: matrix: configure DB on launch

This commit is contained in:
Bruno BELANYI 2021-02-04 17:06:11 +01:00
parent 303da60e0b
commit 6b1de02ea3

View file

@ -24,6 +24,13 @@ in
services.postgresql = {
enable = true;
package = pkgs.postgresql_12;
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'';
};
services.postgresqlBackup = {