nix-infra/config/hosts/matrix/postgresql.nix
yuri 58d529d0ba Configure Matrix host
Co-authored-by: julian <julian@jsts.xyz>
2023-10-06 05:33:28 +02:00

17 lines
445 B
Nix

{ pkgs, config, ... }:
{
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";
'';
dataDir = "/mnt/data/postgresql/${config.services.postgresql.package.psqlSchema}";
};
}