2023-08-29 16:10:22 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
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";
|
2024-11-08 01:22:57 +01:00
|
|
|
CREATE ROLE "mas_user" WITH LOGIN PASSWORD 'mas';
|
|
|
|
CREATE DATABASE "mas" WITH OWNER "mas_user"
|
|
|
|
TEMPLATE template0
|
|
|
|
LC_COLLATE = "C"
|
|
|
|
LC_CTYPE = "C";
|
2023-08-29 16:10:22 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|