Merge pull request #105347 from Mic92/nginx

nixos/nginx: add streamConfig option
This commit is contained in:
Kevin Cox 2021-01-07 08:46:29 -05:00 committed by GitHub
commit 8455fa3bca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,6 +206,12 @@ let
${cfg.httpConfig}
}''}
${optionalString (cfg.streamConfig != "") ''
stream {
${cfg.streamConfig}
}
''}
${cfg.appendConfig}
'';
@ -483,6 +489,21 @@ in
";
};
streamConfig = mkOption {
type = types.lines;
default = "";
example = ''
server {
listen 127.0.0.1:53 udp reuseport;
proxy_timeout 20s;
proxy_pass 192.168.0.1:53535;
}
'';
description = "
Configuration lines to be set inside the stream block.
";
};
eventsConfig = mkOption {
type = types.lines;
default = "";