Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17a5b644249e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6f607a940a9
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 6, 2019

  1. nixos/nginx: Support additional listen parameters (#56971)

    (cherry picked from commit 57e8b48)
    dasJ authored and danbst committed Mar 6, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    nlf nlf
    Copy the full SHA
    c6f607a View commit details
Showing with 3 additions and 1 deletion.
  1. +2 −1 nixos/modules/services/web-servers/nginx/default.nix
  2. +1 −0 nixos/modules/services/web-servers/nginx/vhost-options.nix
3 changes: 2 additions & 1 deletion nixos/modules/services/web-servers/nginx/default.nix
Original file line number Diff line number Diff line change
@@ -194,11 +194,12 @@ let
then filter (x: x.ssl) defaultListen
else defaultListen;

listenString = { addr, port, ssl, ... }:
listenString = { addr, port, ssl, extraParameters ? [], ... }:
"listen ${addr}:${toString port} "
+ optionalString ssl "ssl "
+ optionalString (ssl && vhost.http2) "http2 "
+ optionalString vhost.default "default_server "
+ optionalString (extraParameters != []) (concatStringsSep " " extraParameters)
+ ";";

redirectListen = filter (x: !x.ssl) defaultListen;
1 change: 1 addition & 0 deletions nixos/modules/services/web-servers/nginx/vhost-options.nix
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@ with lib;
addr = mkOption { type = str; description = "IP address."; };
port = mkOption { type = int; description = "Port number."; default = 80; };
ssl = mkOption { type = bool; description = "Enable SSL."; default = false; };
extraParameters = mkOption { type = listOf str; description = "Extra parameters of this listen directive."; default = []; example = [ "reuseport" "deferred" ]; };
}; });
default = [];
example = [