summary refs log tree commit diff
path: root/host/Rory-desktop/services/nginx.nix
diff options
context:
space:
mode:
Diffstat (limited to 'host/Rory-desktop/services/nginx.nix')
-rw-r--r--host/Rory-desktop/services/nginx.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/host/Rory-desktop/services/nginx.nix b/host/Rory-desktop/services/nginx.nix
new file mode 100644

index 0000000..a58a463 --- /dev/null +++ b/host/Rory-desktop/services/nginx.nix
@@ -0,0 +1,43 @@ +{ + config, + pkgs, + lib, + ... +}: + +{ + services = { + nginx = { + enable = true; + #package = pkgs.nginxQuic; + recommendedProxySettings = true; + #recommendedTlsSettings = true; + experimentalZstdSettings = true; + # recommendedGzipSettings = true; + recommendedBrotliSettings = true; + recommendedOptimisation = true; + #defaultMimeTypes = ../../../../packages/nginx/mime.types; + appendConfig = '' + worker_processes 16; + ''; + eventsConfig = '' + #use kqueue; + worker_connections 512; + ''; + appendHttpConfig = '' + #sendfile on; + disable_symlinks off; + ''; + additionalModules = with pkgs.nginxModules; [ moreheaders ]; + virtualHosts = { + "discord.localhost" = import ./nginx/discord.localhost.nix { inherit pkgs; }; + "hse.localhost" = import ./nginx/hse.localhost.nix { inherit pkgs; }; + "matrix.opensuse.localhost" = import ./nginx/matrix.opensuse.localhost.nix { inherit pkgs; }; + "synapse.localhost" = import ./nginx/synapse.localhost.nix { inherit pkgs; }; + }; + }; + }; + systemd.services.nginx.serviceConfig = { + LimitNOFILE = 5000000; + }; +}