57 lines
1.5 KiB
Nix
57 lines
1.5 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.matrix-synapse = {
|
|
enable = true;
|
|
server_name = "graven.dev";
|
|
enable_registration = false;
|
|
# This causes infinite recursion for some reason. TODO: Investigate
|
|
#registration_shared_secret = builtins.toString config.secrets.files.synapse_registration_shared_secret.file;
|
|
#turn_shared_secret = builtins.toString config.secrets.files.synapse_turn_shared_secret.file;
|
|
turn_shared_secret = "a_long_string_that_i_will_be_changing";
|
|
max_upload_size = "100M";
|
|
database_type = "psycopg2";
|
|
database_user = "synapse";
|
|
database_name = "synapse";
|
|
logConfig = ''
|
|
version: 1
|
|
|
|
formatters:
|
|
precise:
|
|
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
|
|
|
handlers:
|
|
console:
|
|
class: logging.StreamHandler
|
|
formatter: precise
|
|
|
|
loggers:
|
|
synapse.storage.SQL:
|
|
# beware: increasing this to DEBUG will make synapse log sensitive
|
|
# information such as access tokens.
|
|
level: WARN
|
|
|
|
root:
|
|
level: WARN
|
|
handlers: [console]
|
|
|
|
disable_existing_loggers: false
|
|
'';
|
|
listeners = [
|
|
{
|
|
port = 8008;
|
|
bind_address = "127.0.0.1";
|
|
type = "http";
|
|
tls = false;
|
|
x_forwarded = true;
|
|
resources = [
|
|
{
|
|
names = [ "client" "federation" ];
|
|
compress = false;
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
}
|
|
|