uploadsize
This commit is contained in:
parent
809e20f981
commit
09014f7af5
1 changed files with 11 additions and 4 deletions
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue