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: 6fb8b38afcaf
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3de5726e9b9f
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 6, 2019

  1. Copy the full SHA
    3de5726 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 = [