modules/nixos: add nginx

- set worker_processes / worker_cpu_affinity to auto, enable pcre_jit

- enable ktls

- set a default virtualHost for a 404 and use it for reuseport

- set enableACME, forceSSL by default, disable for localhost

- set robots header and file
This commit is contained in:
zowoq 2024-07-08 09:36:56 +10:00
parent cf8fc93213
commit 01c2beb7b4
10 changed files with 60 additions and 21 deletions
modules/nixos

View file

@ -51,12 +51,8 @@
'';
};
services.nginx.virtualHosts = {
"hydra.nix-community.org" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${toString config.services.hydra.port}";
};
services.nginx.virtualHosts."hydra.nix-community.org" = {
locations."/".proxyPass = "http://localhost:${toString config.services.hydra.port}";
};
# Create user accounts