summary refs log tree commit diff
path: root/host/Rory-portable/nginx.nix
blob: fc2adca0e300b6dd6d4254c2641fe310d8dec8de (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
{ 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;
  };

}