feat: elaborate nginx options

This commit is contained in:
Constantin Gierczak--Galle 2024-11-03 16:58:05 +01:00
parent 1b13296783
commit 59d9b333d1
No known key found for this signature in database
2 changed files with 16 additions and 3 deletions

View file

@ -62,14 +62,13 @@ in
}; };
}; };
# NOTE: for now, we use internal ports
# TODO: switch to unixsockets if supported # TODO: switch to unixsockets if supported
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
}; };
nix = { nix = {
settings = { settings = {
trusted-users = [ "@wheel" "root" "nix-ssh" ]; trusted-users = [ "@wheel" "root" "nix-ssh" ];
auto-optimise-store = true; auto-optimise-store = true;

View file

@ -43,6 +43,20 @@
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
serverAliases = []; serverAliases = [];
locations."/".proxyPass = "http://localhost:2342/"; recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
clientMaxBodySize = "500m";
locations."/" = {
proxyPass = "http://localhost:2342/";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_buffering off;
proxy_http_version 1.1;
'';
};
}; };
} }