From 96eb427ea7cd2462f367a9fad04b434ff43624fe Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 3 May 2023 22:22:09 +0000 Subject: [PATCH] matrix: support larger uploads (100M) --- hosts/by-name/servo/services/matrix/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hosts/by-name/servo/services/matrix/default.nix b/hosts/by-name/servo/services/matrix/default.nix index 95e7718a..e4f74d7c 100644 --- a/hosts/by-name/servo/services/matrix/default.nix +++ b/hosts/by-name/servo/services/matrix/default.nix @@ -1,5 +1,6 @@ -# docs: https://nixos.wiki/wiki/Matrix -# docs: https://nixos.org/manual/nixos/stable/index.html#module-services-matrix-synapse +# docs: +# docs: +# example config: { config, lib, pkgs, ... }: { @@ -41,6 +42,9 @@ } ]; + services.matrix-synapse.settings.x_forwarded = true; # because we proxy matrix behind nginx + services.matrix-synapse.settings.max_upload_size = "100M"; # default is "50M" + services.matrix-synapse.settings.admin_contact = "admin.matrix@uninsane.org"; services.matrix-synapse.settings.registrations_require_3pid = [ "email" ]; @@ -94,6 +98,10 @@ locations."/" = { proxyPass = "http://127.0.0.1:8008"; + extraConfig = '' + # allow uploading large files (matrix enforces a separate limit, downstream) + client_max_body_size 512m; + ''; }; # redirect browsers to the web client. # i don't think native matrix clients ever fetch the root.