From 0139874db9bca4be6f54c52f2da40e8ac7c5237b Mon Sep 17 00:00:00 2001 From: Sandro Date: Sat, 17 Apr 2021 00:25:03 +0200 Subject: [PATCH] nixos/nginx: add upstreams examples (#118447) * nixos/nginx: add upstreams examples I am not fully sure if they are fully correct but they deployed the right syntax. * nixos/nginx: use literal example * Update nixos/modules/services/web-servers/nginx/default.nix * Update nixos/modules/services/web-servers/nginx/default.nix --- nixos/modules/services/web-servers/nginx/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 7591ad0c3d24..389911ffcce8 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -676,6 +676,7 @@ in Defines the address and other parameters of the upstream servers. ''; default = {}; + example = { "127.0.0.1:8000" = {}; }; }; extraConfig = mkOption { type = types.lines; @@ -690,6 +691,14 @@ in Defines a group of servers to use as proxy target. ''; default = {}; + example = literalExample '' + "backend_server" = { + servers = { "127.0.0.1:8000" = {}; }; + extraConfig = '''' + keepalive 16; + ''''; + }; + ''; }; virtualHosts = mkOption {