about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro2023-04-02 00:32:47 +0200
committerGitHub2023-04-02 00:32:47 +0200
commit44bdb9ce9f5ac84765b1dbae822d5232c620905b (patch)
tree91b192109f08f862e5cb9adac49fc1af0fb00ad5 /nixos
parentc3b82ff817514b30e8006e1f6749575424c1b178 (diff)
parent427ae14373ecc86fac5037f6c71ff4ccedd9a421 (diff)
Merge pull request #223091 from Izorkin/update-nginx-compression
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index 577e9f94da8b..f2cf7a28b118 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;
@@ -484,7 +485,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`.
         '';
@@ -495,24 +497,26 @@ 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/).
         '';
       };
 
-      recommendedProxySettings = mkOption {
+      recommendedZstdSettings = mkOption {
         default = false;
         type = types.bool;
         description = lib.mdDoc ''
-          Whether to enable recommended proxy settings if a vhost does not specify the option manually.
+          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`.
         '';
       };
 
-      recommendedZstdSettings = mkOption {
+      recommendedProxySettings = 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`.
+          Whether to enable recommended proxy settings if a vhost does not specify the option manually.
         '';
       };