summaryrefslogtreecommitdiff
path: root/hosts/surtr/matrix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-02-28 15:27:09 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-02-28 15:27:09 +0100
commitba0cb4970ed204feae2cffc895d9f7fdc46cabb2 (patch)
tree817cb55c4c89eab54a957b2890474bf086e15732 /hosts/surtr/matrix
parentcdae0b1a00e8d231a59ecda330edeab19ce4c4d8 (diff)
downloadnixos-ba0cb4970ed204feae2cffc895d9f7fdc46cabb2.tar
nixos-ba0cb4970ed204feae2cffc895d9f7fdc46cabb2.tar.gz
nixos-ba0cb4970ed204feae2cffc895d9f7fdc46cabb2.tar.bz2
nixos-ba0cb4970ed204feae2cffc895d9f7fdc46cabb2.tar.xz
nixos-ba0cb4970ed204feae2cffc895d9f7fdc46cabb2.zip
surtr: matrix: url preview
Diffstat (limited to 'hosts/surtr/matrix')
-rw-r--r--hosts/surtr/matrix/default.nix27
1 files changed, 20 insertions, 7 deletions
diff --git a/hosts/surtr/matrix/default.nix b/hosts/surtr/matrix/default.nix
index 842c6c56..777f9f84 100644
--- a/hosts/surtr/matrix/default.nix
+++ b/hosts/surtr/matrix/default.nix
@@ -38,14 +38,27 @@ with lib;
38 "/run/credentials/matrix-synapse.service/registration.yaml" 38 "/run/credentials/matrix-synapse.service/registration.yaml"
39 "/run/credentials/matrix-synapse.service/turn-secret.yaml" 39 "/run/credentials/matrix-synapse.service/turn-secret.yaml"
40 ]; 40 ];
41 extraConfig = '' 41 extraConfig = generators.toYAML {} {
42 refreshable_access_token_lifetime: 5m 42 "refreshable_access_token_lifetime" = "5m";
43 # nonrefreshable_access_token_lifetime: 1w 43 # "nonrefreshable_access_token_lifetime" = "1w"; # TODO: uncomment once all (relevant) clients have support for refreshable tokens
44 refresh_token_lifetime: 1w 44 "refresh_token_lifetime" = "1w";
45 registration_requires_token: true 45 "registration_requires_token" = true;
46 46
47 admin_contact: 'mailto:matrix-admin@yggdrasil.li' 47 "admin_contact" = "mailto:matrix-admin@yggdrasil.li";
48 ''; 48
49 "url_preview_enabled" = true;
50 "url_preview_ip_range_blacklist" = [
51 "127.0.0.0/8" "10.0.0.0/8" "172.16.0.0/12" "192.168.0.0/16"
52 "100.64.0.0/10" "192.0.0.0/24" "169.254.0.0/16"
53 "192.88.99.0/24" "198.18.0.0/15" "192.0.2.0/24"
54 "198.51.100.0/24" "203.0.113.0/24" "224.0.0.0/4" "::1/128"
55 "fe80::/10" "fc00::/7" "2001:db8::/32" "ff00::/8"
56 "fec0::/10" "2a03:4000:52:ada::/64"
57 ];
58 "url_preview_ip_range_whitelist" = [
59 "2a03:4000:52:ada::/128"
60 ];
61 };
49 }; 62 };
50 sops.secrets."matrix-synapse-registration.yaml" = { 63 sops.secrets."matrix-synapse-registration.yaml" = {
51 format = "binary"; 64 format = "binary";