nix-infra/config/hosts/matrix/postgresql.nix
June f9fc034556 Set PostgreSQL package to PostgreSQL 15 for matrix host
Also remove the upgrade script again.

Bascially do steps 4 and 5 of the following section of the manual:
https://nixos.org/manual/nixos/stable/#module-services-postgres-upgrading
2023-12-06 00:52:05 +01:00

19 lines
479 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}";
};
}