From 811f243ce6f1ce82cf93bc5b45e5879513a2a305 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Wed, 10 Feb 2016 16:02:38 +0100 Subject: nginx module: Add extraConfig for locations --- nixos/modules/services/web-servers/nginx/default.nix | 1 + nixos/modules/services/web-servers/nginx/location-options.nix | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'nixos') diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 18fce9672dda..62348d48f5dc 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -117,6 +117,7 @@ let location ${location} { ${optionalString (config.proxyPass != null) "proxy_pass ${config.proxyPass};"} ${optionalString (config.root != null) "root ${config.root};"} + ${config.extraConfig} } '') locations); in diff --git a/nixos/modules/services/web-servers/nginx/location-options.nix b/nixos/modules/services/web-servers/nginx/location-options.nix index 6537e45a459d..ce3462bed0a4 100644 --- a/nixos/modules/services/web-servers/nginx/location-options.nix +++ b/nixos/modules/services/web-servers/nginx/location-options.nix @@ -27,6 +27,14 @@ with lib; Root directory for requests. ''; }; + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + These lines go to the end of the location verbatim. + ''; + }; }; } -- cgit 1.4.1