forked from CCCHH/nix-infra
18 lines
475 B
Nix
18 lines
475 B
Nix
{ pkgs, config, ... }:
|
|
|
|
{
|
|
services.postgresql = {
|
|
enable = true;
|
|
package = pkgs.postgresql_15;
|
|
|
|
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}";
|
|
};
|
|
}
|