nixos/nginx: add streamConfig option

This commit is contained in:
Jörg Thalheim 2020-10-25 07:21:00 +01:00
parent a34aa811bd
commit f84f71e1e0
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92

View File

@ -179,6 +179,12 @@ let
${cfg.httpConfig}
}''}
${optionalString (cfg.streamConfig != "") ''
stream {
${cfg.streamConfig}
}
''}
${cfg.appendConfig}
'';
@ -452,6 +458,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 = "";