uploadsize
This commit is contained in:
parent
809e20f981
commit
09014f7af5
1 changed files with 11 additions and 4 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
domain = "jeppers.app";
|
domain = "jeppers.app";
|
||||||
fqdn = "matrix.${domain}";
|
fqdn = "matrix.${domain}";
|
||||||
baseUrl = "https://${fqdn}";
|
baseUrl = "https://${fqdn}";
|
||||||
|
|
@ -11,15 +12,18 @@ let
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
return 200 '${builtins.toJSON data}';
|
return 200 '${builtins.toJSON data}';
|
||||||
'';
|
'';
|
||||||
|
maxUploadSize = "20M";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server_name = domain;
|
server_name = domain;
|
||||||
public_baseurl = baseUrl;
|
public_baseurl = baseUrl;
|
||||||
|
max_upload_size = maxUploadSize;
|
||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
port = 8008;
|
port = 8008;
|
||||||
|
|
@ -38,22 +42,25 @@ in
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
extraConfigFiles = "/var/custom-access/matrix-shared-secret";
|
|
||||||
};
|
};
|
||||||
|
extraConfigFiles = [ "/var/custom-access/matrix-shared-secret" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
services.nginx.virtualHosts = {
|
||||||
|
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
onlySSL = true;
|
||||||
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||||
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
"${fqdn}" = {
|
"${fqdn}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
onlySSL = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size ${maxUploadSize};
|
||||||
|
'';
|
||||||
locations."/".extraConfig = ''
|
locations."/".extraConfig = ''
|
||||||
return 404;
|
return 404;
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue