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: 9c5fedc23ec6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf12bc44b64f
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Dec 19, 2017

  1. nginx service: Make http2 an option.

    HTTP 2 can break some things, for example due to this Chrome bug:
    
      https://bugs.chromium.org/p/chromium/issues/detail?id=796199
    
    So the service hardcoding it to be enabled is not helpful.
    
    This commit adds an option so you can turn it off.
    nh2 committed Dec 19, 2017
    Copy the full SHA
    afa97cb View commit details

Commits on Dec 20, 2017

  1. Merge pull request #32858 from nh2/nginx-add-http2-option

    nginx service: Make http2 an option.
    fpletz authored Dec 20, 2017

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cf12bc4 View commit details
Showing with 16 additions and 1 deletion.
  1. +2 −1 nixos/modules/services/web-servers/nginx/default.nix
  2. +14 −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
@@ -167,7 +167,8 @@ let

listenString = { addr, port, ssl, ... }:
"listen ${addr}:${toString port} "
+ optionalString ssl "ssl http2 "
+ optionalString ssl "ssl "
+ optionalString vhost.http2 "http2 "
+ optionalString vhost.default "default_server "
+ ";";

14 changes: 14 additions & 0 deletions nixos/modules/services/web-servers/nginx/vhost-options.nix
Original file line number Diff line number Diff line change
@@ -114,6 +114,20 @@ with lib;
description = "Path to server SSL certificate key.";
};

http2 = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable HTTP 2.
Note that (as of writing) due to nginx's implementation, to disable
HTTP 2 you have to disable it on all vhosts that use a given
IP address / port.
If there is one server block configured to enable http2,then it is
enabled for all server blocks on this IP.
See https://stackoverflow.com/a/39466948/263061.
'';
};

root = mkOption {
type = types.nullOr types.path;
default = null;