uploadsize

This commit is contained in:
Till 2026-03-06 23:14:39 +01:00
parent 809e20f981
commit 09014f7af5

View file

@ -1,6 +1,7 @@
{ ... }:
let
domain = "jeppers.app";
fqdn = "matrix.${domain}";
baseUrl = "https://${fqdn}";
@ -11,15 +12,18 @@ let
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON data}';
'';
maxUploadSize = "20M";
in
{
services.matrix-synapse = {
enable = true;
settings = {
server_name = domain;
public_baseurl = baseUrl;
max_upload_size = maxUploadSize;
listeners = [
{
port = 8008;
@ -38,22 +42,25 @@ in
];
}
];
extraConfigFiles = "/var/custom-access/matrix-shared-secret";
};
extraConfigFiles = [ "/var/custom-access/matrix-shared-secret" ];
};
services.nginx.virtualHosts = {
"${domain}" = {
enableACME = true;
forceSSL = true;
onlySSL = true;
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
};
"${fqdn}" = {
enableACME = true;
forceSSL = true;
onlySSL = true;
extraConfig = ''
client_max_body_size ${maxUploadSize};
'';
locations."/".extraConfig = ''
return 404;
'';
@ -62,6 +69,6 @@ in
};
};
services.postgresql.enable = true;
services.postgresql.enable = true;
}