git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #105347 from Mic92/nginx
8455fa3Kevin Cox
nixos/modules/services/web-servers/nginx/default.nix+21
@@ -206,6 +206,12 @@ let
206 ${cfg.httpConfig}
206 ${cfg.httpConfig}
207 }''}
207 }''}
208
208
209+ ${optionalString (cfg.streamConfig != "") ''
210+ stream {
211+ ${cfg.streamConfig}
212+ }
213+ ''}
214+
209 ${cfg.appendConfig}
215 ${cfg.appendConfig}
210 '';
216 '';
211
217
@@ -483,6 +489,21 @@ in
483 ";
489 ";
484 };
490 };
485
491
492+ streamConfig = mkOption {
493+ type = types.lines;
494+ default = "";
495+ example = ''
496+ server {
497+ listen 127.0.0.1:53 udp reuseport;
498+ proxy_timeout 20s;
499+ proxy_pass 192.168.0.1:53535;
500+ }
501+ '';
502+ description = "
503+ Configuration lines to be set inside the stream block.
504+ ";
505+ };
506+
486 eventsConfig = mkOption {
507 eventsConfig = mkOption {
487 type = types.lines;
508 type = types.lines;
488 default = "";
509 default = "";