services: nginx: optimize overall configuration

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2024-06-04 17:23:57 +02:00
parent baf8a4e2e6
commit e7b0f7a938
Signed by: c8h4
GPG key ID: 73D5E7FDEE3DE49A
6 changed files with 9 additions and 3 deletions

View file

@ -69,6 +69,10 @@ in {
services.btrfs.autoScrub.fileSystems = [ "/" ];
services.nginx.appendConfig = ''
worker_processes auto;
'';
environment.systemPackages = with pkgs; [ wireguard-tools ];
networking.hosts = my.homelab.hosts;

Binary file not shown.

Binary file not shown.

View file

@ -54,7 +54,6 @@ in {
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_buffering off;
client_max_body_size 32M;
'';
};

View file

@ -60,9 +60,7 @@ in {
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_buffering off;
proxy_hide_header X-Powered-By;
client_max_body_size 8M;
'';
};
};

View file

@ -18,6 +18,11 @@
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedZstdSettings = true;
clientMaxBodySize = "16M";
appendHttpConfig = ''
# avoid hitting the disk
proxy_max_temp_file_size 0;
'';
};
users.users.nginx.extraGroups = [ config.security.acme.defaults.group ];