2023-10-06 05:33:28 +02:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
2023-12-06 00:52:05 +01:00
|
|
|
package = pkgs.postgresql_15;
|
2024-03-06 22:50:32 +01:00
|
|
|
|
2023-10-06 05:33:28 +02:00
|
|
|
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";
|
|
|
|
'';
|
|
|
|
|
|
|
|
dataDir = "/mnt/data/postgresql/${config.services.postgresql.package.psqlSchema}";
|
|
|
|
};
|
|
|
|
}
|