port synapse to postgres

This commit is contained in:
Giulio De Pasquale 2021-09-07 11:24:11 +02:00
parent 183df298a7
commit f8ed25e743

View File

@ -6,11 +6,11 @@ with import ./network.nix;
matrix-synapse = {
enable = true;
server_name = "${matrixdomain}";
database_type = "sqlite3";
database_name = "synapse";
public_baseurl = "https://${matrixdomain}";
registration_shared_secret = "runas!";
dynamic_thumbnails = true;
enable_registration = true;
#enable_registration = true;
app_service_config_files = [
"/var/lib/matrix-synapse/discord-registration.yaml"
"/var/lib/matrix-synapse/telegram-registration.yaml"
@ -39,6 +39,19 @@ with import ./network.nix;
];
};
postgresql = {
enable = true;
ensureDatabases = [ "synapse" ];
ensureUsers = [
{
name = "matrix-synapse";
ensurePermissions = {
"DATABASE synapse" = "ALL PRIVILEGES";
};
}
];
};
nginx.virtualHosts = {
# server
${matrixdomain} = {