2023-02-19 02:04:30 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2023-02-26 21:47:24 +01:00
|
|
|
services = {
|
|
|
|
matrix-synapse = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server_name = "synapse.schrottkatze.de";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
postgresql = {
|
|
|
|
enable = true;
|
|
|
|
initialScript = pkgs.writeText "synapse-init.sql" ''
|
|
|
|
CREATE ROLE "matrix-synapse";
|
|
|
|
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
|
|
|
|
TEMPLATE template0
|
|
|
|
LC_COLLATE = "C"
|
|
|
|
LC_CTYPE = "C";
|
|
|
|
'';
|
|
|
|
|
|
|
|
#initdbArgs = [
|
|
|
|
#"--locale=C"
|
|
|
|
#"--encoding=UTF8"
|
|
|
|
#];
|
|
|
|
ensureDatabases = [ "matrix-synapse" ];
|
|
|
|
ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "matrix-synapse";
|
|
|
|
ensurePermissions."DATABASE \"matrix-synapse\"" = "ALL PRIVILEGES";
|
|
|
|
}
|
|
|
|
];
|
2023-02-19 02:04:30 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|