summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-04-05 01:27:06 +0200
committerSandro Jäckel <sandro.jaeckel@gmail.com>2021-05-17 02:37:44 +0200
commit51166f90c694785975c2b0f48a20dd35663bb1fa (patch)
tree9f1cb3db03cee37f7fb1b1a918b5e9f144a91e05 /nixos
parent8aea69e5ab0bd8f276854c8b3024a8ee70a4275a (diff)
downloadnixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar.gz
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar.bz2
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar.lz
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar.xz
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.tar.zst
nixpkgs-51166f90c694785975c2b0f48a20dd35663bb1fa.zip
nixos/nginx: add option to change proxy timeouts
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-servers/nginx/default.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix
index d811879b7b1..1a078ea6bd5 100644
--- a/nixos/modules/services/web-servers/nginx/default.nix
+++ b/nixos/modules/services/web-servers/nginx/default.nix
@@ -154,9 +154,9 @@ let
 
       ${optionalString (cfg.recommendedProxySettings) ''
         proxy_redirect          off;
-        proxy_connect_timeout   60;
-        proxy_send_timeout      60;
-        proxy_read_timeout      60;
+        proxy_connect_timeout   ${cfg.proxyTimeout};
+        proxy_send_timeout      ${cfg.proxyTimeout};
+        proxy_read_timeout      ${cfg.proxyTimeout};
         proxy_http_version      1.1;
         include ${recommendedProxyConfig};
       ''}
@@ -401,6 +401,15 @@ in
         ";
       };
 
+      proxyTimeout = mkOption {
+        type = types.str;
+        default = "60s";
+        example = "20s";
+        description = "
+          Change the proxy related timeouts in recommendedProxySettings.
+        ";
+      };
+
       package = mkOption {
         default = pkgs.nginxStable;
         defaultText = "pkgs.nginxStable";