diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2016-02-10 16:02:38 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-07-28 11:59:13 +0000 |
commit | 811f243ce6f1ce82cf93bc5b45e5879513a2a305 (patch) | |
tree | 2052994e57a842ec1e57003b6de9212267ac86c6 /nixos | |
parent | d5a097fdb609ec5ffb09bcab632e4b2a03ae05ca (diff) | |
download | nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar.gz nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar.bz2 nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar.lz nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar.xz nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.tar.zst nixlib-811f243ce6f1ce82cf93bc5b45e5879513a2a305.zip |
nginx module: Add extraConfig for locations
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/nginx/location-options.nix | 8 |
2 files changed, 9 insertions, 0 deletions
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. + ''; + }; }; } |