summary refs log tree commit diff
path: root/host/Rory-desktop/nginx.nix
blob: dfb1d0348c3b76b7ec1a4f6ed12da00f9daa281a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
  config,
  pkgs,
  lib,
  ...
}:

{
  services = {
    nginx = {
      enable = true;
      #package = pkgs.nginxQuic;
      recommendedProxySettings = true;
      #recommendedTlsSettings = true;
      recommendedZstdSettings = true;
#      recommendedGzipSettings = true;
      recommendedBrotliSettings = true;
      recommendedOptimisation = true;
      #defaultMimeTypes = ../../../../modules/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; };

      };
    };
  };
  systemd.services.nginx.serviceConfig = {
    LimitNOFILE = 5000000;
  };

}