73 lines
2.2 KiB
Nix
73 lines
2.2 KiB
Nix
{ ... }:
|
|
{
|
|
services.matrix-synapse = {
|
|
enable = true;
|
|
settings = {
|
|
listeners = [{
|
|
port = 8008;
|
|
bind_addresses = [
|
|
"::1"
|
|
"127.0.0.1"
|
|
];
|
|
type = "http";
|
|
tls = false;
|
|
x_forwarded = true;
|
|
resources = [
|
|
{
|
|
compress = true;
|
|
names = [ "client" ];
|
|
}
|
|
{
|
|
compress = false;
|
|
names = [ "federation" ];
|
|
}
|
|
];
|
|
}];
|
|
server_name = "nekover.se";
|
|
public_baseurl = "https://matrix.nekover.se";
|
|
database = {
|
|
name = "psycopg2";
|
|
args.password = "synapse";
|
|
};
|
|
email = {
|
|
smtp_host = "mail-1.grzb.de";
|
|
smtp_port = 465;
|
|
smtp_user = "matrix@nekover.se";
|
|
force_tls = true;
|
|
notif_from = "Nekoverse Matrix Server <nyareply@nekover.se>";
|
|
};
|
|
max_upload_size = "500M";
|
|
signing_key_path = "/secrets/matrix-homeserver-signing-key.secret";
|
|
admin_contact = "mailto:admin@nekover.se";
|
|
web_client_location = "https://element.nekover.se";
|
|
turn_uris = [
|
|
"turns:turn.nekover.se?transport=udp"
|
|
"turns:turn.nekover.se?transport=tcp"
|
|
];
|
|
turn_user_lifetime = 86400000;
|
|
turn_allow_guests = true;
|
|
experimental_features = {
|
|
msc3861 = {
|
|
enabled = true;
|
|
# Synapse will call `{issuer}/.well-known/openid-configuration` to get the OIDC configuration
|
|
issuer = "https://nekover.se";
|
|
client_id = "0000000000000000000SYNAPSE";
|
|
client_auth_method = "client_secret_basic";
|
|
# Matches the `client_secret` in the auth service config
|
|
client_secret = "SomeRandomSecret";
|
|
# Matches the `matrix.secret` in the auth service config
|
|
admin_token = "AnotherRandomSecret";
|
|
account_management_url = "https://id.nekover.se/realms/nekoverse/account/";
|
|
};
|
|
};
|
|
};
|
|
extras = [ "oidc" ];
|
|
extraConfigFiles = [
|
|
"/secrets/matrix-registration-shared-secret.secret"
|
|
"/secrets/matrix-turn-shared-secret.secret"
|
|
"/secrets/matrix-email-smtp-pass.secret"
|
|
"/secrets/matrix-keycloak-client-secret.secret"
|
|
];
|
|
};
|
|
}
|