From 427ae14373ecc86fac5037f6c71ff4ccedd9a421 Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sat, 25 Mar 2023 19:36:42 +0300 Subject: [PATCH] nixos/nginx: update description in compression modules --- .../services/web-servers/nginx/default.nix | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 064c86a9a7e2..7fe1c120f5b1 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -184,8 +184,9 @@ let brotli_types ${lib.concatStringsSep " " compressMimeTypes}; ''} - ${optionalString cfg.recommendedGzipSettings '' + ${optionalString cfg.recommendedGzipSettings # https://docs.nginx.com/nginx/admin-guide/web-server/compression/ + '' gzip on; gzip_static on; gzip_vary on; @@ -476,7 +477,8 @@ in default = false; type = types.bool; description = lib.mdDoc '' - Enable recommended brotli settings. Learn more about compression in Brotli format [here](https://github.com/google/ngx_brotli/blob/master/README.md). + Enable recommended brotli settings. + Learn more about compression in Brotli format [here](https://github.com/google/ngx_brotli/). This adds `pkgs.nginxModules.brotli` to `services.nginx.additionalModules`. ''; @@ -487,6 +489,18 @@ in type = types.bool; description = lib.mdDoc '' Enable recommended gzip settings. + Learn more about compression in Gzip format [here](https://docs.nginx.com/nginx/admin-guide/web-server/compression/). + ''; + }; + + recommendedZstdSettings = mkOption { + default = false; + type = types.bool; + description = lib.mdDoc '' + Enable recommended zstd settings. + Learn more about compression in Zstd format [here](https://github.com/tokers/zstd-nginx-module). + + This adds `pkgs.nginxModules.zstd` to `services.nginx.additionalModules`. ''; }; @@ -498,16 +512,6 @@ in ''; }; - recommendedZstdSettings = mkOption { - default = false; - type = types.bool; - description = lib.mdDoc '' - Enable recommended zstd settings. Learn more about compression in Zstd format [here](https://github.com/tokers/zstd-nginx-module). - - This adds `pkgs.nginxModules.zstd` to `services.nginx.additionalModules`. - ''; - }; - proxyTimeout = mkOption { type = types.str; default = "60s";