Emelie Graven
90eb0c3708
The entire file structure has been reorganised into stable and unstable to separate deployments running on either channel. A `mail` host running Simple Nix Mailserver has also been added for testing to see if it's a good alternative to soverin as well as SMTP for other services.
73 lines
2 KiB
Nix
73 lines
2 KiB
Nix
{ config, ... }:
|
|
|
|
{
|
|
services.matrix-synapse = {
|
|
enable = true;
|
|
server_name = "anarkafem.dev";
|
|
enable_registration = false;
|
|
registration_shared_secret = builtins.toString config.secrets.files.synapse_registration_shared_secret.file;
|
|
turn_shared_secret = builtins.toString config.secrets.files.turn_shared_secret.file;
|
|
max_upload_size = "20M";
|
|
database_type = "psycopg2";
|
|
database_user = "synapse";
|
|
database_name = "synapse";
|
|
turn_uris = [
|
|
"turn:turn.anarkafem.dev:3478?transport=udp"
|
|
"turn:turn.anarkafem.dev:3478?transport=tcp"
|
|
"turn:turn.anarkafem.dev:3479?transport=udp"
|
|
"turn:turn.anarkafem.dev:3479?transport=tcp"
|
|
"turns:turn.anarkafem.dev:5349?transport=udp"
|
|
"turns:turn.anarkafem.dev:5349?transport=tcp"
|
|
"turns:turn.anarkafem.dev:5350?transport=udp"
|
|
"turns:turn.anarkafem.dev:5350?transport=tcp"
|
|
];
|
|
report_stats = false;
|
|
withJemalloc = true;
|
|
servers = { "anarkafem.dev" = {}; };
|
|
extraConfig = ''
|
|
auto_join_rooms:
|
|
- "#suf-aalborg:anarkafem.dev"
|
|
'';
|
|
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: INFO
|
|
|
|
root:
|
|
level: INFO
|
|
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;
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
}
|
|
|