Skip to content

Commit

Permalink
Merge pull request #105347 from Mic92/nginx
Browse files Browse the repository at this point in the history
nixos/nginx: add streamConfig option
  • Loading branch information
kevincox committed Jan 7, 2021
2 parents 9ae9f92 + 6f330cc commit 8455fa3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions nixos/modules/services/web-servers/nginx/default.nix
Expand Up @@ -206,6 +206,12 @@ let
${cfg.httpConfig}
}''}
${optionalString (cfg.streamConfig != "") ''
stream {
${cfg.streamConfig}
}
''}
${cfg.appendConfig}
'';

Expand Down Expand Up @@ -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 = "";
Expand Down

0 comments on commit 8455fa3

Please sign in to comment.