From 9557522d1f8dfd5927e7dcdcdef0945e2e360eff Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 27 Feb 2022 15:36:21 +0100 Subject: surtr: matrix: ... --- hosts/surtr/matrix/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'hosts/surtr') diff --git a/hosts/surtr/matrix/default.nix b/hosts/surtr/matrix/default.nix index 58ea04cb..ffaf6656 100644 --- a/hosts/surtr/matrix/default.nix +++ b/hosts/surtr/matrix/default.nix @@ -5,7 +5,7 @@ enable = true; enable_metrics = true; - enable_registration = false; + enable_registration = true; allow_guest_access = false; server_name = "synapse.li"; @@ -14,10 +14,7 @@ { bind_address = "localhost"; port = 8008; resources = [ - { names = [ "client" ]; - compress = true; - } - { names = [ "federation" ]; + { names = [ "client" "federation" ]; compress = false; } ]; @@ -38,6 +35,14 @@ "/run/credentials/matrix-synapse.service/registration.yaml" "/run/credentials/matrix-synapse.service/turn-secret.yaml" ]; + extraConfig = '' + refreshable_access_token_lifetime: 5m + nonrefreshable_access_token_lifetime: 24h + refresh_token_lifetime: 24h + registration_requires_token: true + + admin_contact: 'mailto:matrix-admin@yggdrasil.li' + ''; }; sops.secrets."matrix-synapse-registration.yaml" = { format = "binary"; -- cgit v1.2.3