Merge pull request #223091 from Izorkin/update-nginx-compression

This commit is contained in:
Sandro 2023-04-02 00:32:47 +02:00 committed by GitHub
commit 44bdb9ce9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,6 +497,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`.
'';
};
@ -506,16 +520,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";