mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 10:22:54 +08:00
nixos/nginx: add extraConfigPre option for locations
This commit is contained in:
@@ -528,6 +528,7 @@ let
|
||||
concatStringsSep "\n" (
|
||||
map (config: ''
|
||||
location ${config.location} {
|
||||
${config.extraConfigPre}
|
||||
${optionalString (
|
||||
config.proxyPass != null && !cfg.proxyResolveWhileRunning
|
||||
) "proxy_pass ${config.proxyPass};"}
|
||||
|
||||
@@ -131,6 +131,14 @@ with lib;
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfigPre = mkOption {
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
These lines go to the beginning of the location verbatim.
|
||||
'';
|
||||
};
|
||||
|
||||
priority = mkOption {
|
||||
type = types.int;
|
||||
default = 1000;
|
||||
|
||||
Reference in New Issue
Block a user