about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2019-10-09 17:32:40 +0200
committerGitHub <noreply@github.com>2019-10-09 17:32:40 +0200
commit8e1fdad7c69a055b431580db717d6d9270e18175 (patch)
treebe52d52f6de14b8a2d34e0fdc2421c5495a8b369 /nixos
parent18b5ca29f5056bcfc280b76037a08c95a3e31f04 (diff)
parent2d0b34aa1cb36f0af8479602ae149c59e4f0fbf3 (diff)
downloadnixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar.gz
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar.bz2
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar.lz
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar.xz
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.tar.zst
nixlib-8e1fdad7c69a055b431580db717d6d9270e18175.zip
Merge pull request #70858 from manveru/nginx-map-hash-sizes
nginx: add map_hash_*_size options
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index ae769694f6bd..eb90dae94dfe 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -122,6 +122,14 @@ let
         include ${recommendedProxyConfig};
       ''}
 
+      ${optionalString (cfg.mapHashBucketSize != null) ''
+        map_hash_bucket_size ${toString cfg.mapHashBucketSize};
+      ''}
+
+      ${optionalString (cfg.mapHashMaxSize != null) ''
+        map_hash_max_size ${toString cfg.mapHashMaxSize};
+      ''}
+
       # $connection_upgrade is used for websocket proxying
       map $http_upgrade $connection_upgrade {
           default upgrade;
@@ -510,6 +518,23 @@ in
         '';
       };
 
+      mapHashBucketSize = mkOption {
+        type = types.nullOr (types.enum [ 32 64 128 ]);
+        default = null;
+        description = ''
+            Sets the bucket size for the map variables hash tables. Default
+            value depends on the processor’s cache line size.
+          '';
+      };
+
+      mapHashMaxSize = mkOption {
+        type = types.nullOr types.ints.positive;
+        default = null;
+        description = ''
+            Sets the maximum size of the map variables hash tables.
+          '';
+      };
+
       resolver = mkOption {
         type = types.submodule {
           options = {