From 4a2a4193f9f3ad4e62c89a448a79a83ac876fca4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 2 Jun 2025 17:48:19 +0200 Subject: [PATCH] nixos/nginx: fix type of mapHashBucketSize While the default is indeed 32/64/128, the option accepts any `size`[1] including values >128, as observed in a customer project. [1] https://nginx.org/en/docs/http/ngx_http_map_module.html --- nixos/modules/services/web-servers/nginx/default.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index bf658564515c..cd4f404a58ee 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -1002,17 +1002,14 @@ in }; mapHashBucketSize = mkOption { - type = types.nullOr ( - types.enum [ - 32 - 64 - 128 - ] - ); + type = types.nullOr (types.ints.positive); default = null; description = '' Sets the bucket size for the map variables hash tables. Default value depends on the processor’s cache line size. + + Refer to [the nginx docs on hashes](https://nginx.org/en/docs/hash.html) + for more information. ''; };