diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-04-19 18:11:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 18:11:51 +0000 |
commit | 6ef7c23763b82a9c816c793c1788b2fd29c3ee0a (patch) | |
tree | a8d00d0f0afe704f9f5f7a4c7a5422927b0a4e60 /nixos | |
parent | 965c8e08a588f4764f75c409fc1909dcd9475122 (diff) | |
parent | b26886474a32426684596700ec833dd1a610215e (diff) | |
download | nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar.gz nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar.bz2 nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar.lz nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar.xz nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.tar.zst nixpkgs-6ef7c23763b82a9c816c793c1788b2fd29c3ee0a.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/mxisd.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/nginx/default.nix | 10 | ||||
-rw-r--r-- | nixos/modules/services/web-servers/nginx/vhost-options.nix | 13 | ||||
-rw-r--r-- | nixos/tests/mxisd.nix | 17 |
4 files changed, 28 insertions, 16 deletions
diff --git a/nixos/modules/services/networking/mxisd.nix b/nixos/modules/services/networking/mxisd.nix index 482d6ff456b..f29d190c626 100644 --- a/nixos/modules/services/networking/mxisd.nix +++ b/nixos/modules/services/networking/mxisd.nix @@ -41,8 +41,8 @@ in { package = mkOption { type = types.package; - default = pkgs.mxisd; - defaultText = "pkgs.mxisd"; + default = pkgs.ma1sd; + defaultText = "pkgs.ma1sd"; description = "The mxisd/ma1sd package to use"; }; diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 389911ffcce..51c2f3febdc 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -249,7 +249,15 @@ let + optionalString (ssl && vhost.http2) "http2 " + optionalString vhost.default "default_server " + optionalString (extraParameters != []) (concatStringsSep " " extraParameters) - + ";"; + + ";" + + (if ssl && vhost.http3 then '' + # UDP listener for **QUIC+HTTP/3 + listen ${addr}:${toString port} http3 reuseport; + # Advertise that HTTP/3 is available + add_header Alt-Svc 'h3=":443"'; + # Sent when QUIC was used + add_header QUIC-Status $quic; + '' else ""); redirectListen = filter (x: !x.ssl) defaultListen; diff --git a/nixos/modules/services/web-servers/nginx/vhost-options.nix b/nixos/modules/services/web-servers/nginx/vhost-options.nix index cf211ea9a71..1f5fe6a368c 100644 --- a/nixos/modules/services/web-servers/nginx/vhost-options.nix +++ b/nixos/modules/services/web-servers/nginx/vhost-options.nix @@ -151,6 +151,19 @@ with lib; ''; }; + http3 = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable HTTP 3. + This requires using <literal>pkgs.nginxQuic</literal> package + which can be achived by setting <literal>services.nginx.package = pkgs.nginxQuic;</literal>. + Note that HTTP 3 support is experimental and + *not* yet recommended for production. + Read more at https://quic.nginx.org/ + ''; + }; + root = mkOption { type = types.nullOr types.path; default = null; diff --git a/nixos/tests/mxisd.nix b/nixos/tests/mxisd.nix index 22755ea353b..354612a8a53 100644 --- a/nixos/tests/mxisd.nix +++ b/nixos/tests/mxisd.nix @@ -6,25 +6,16 @@ import ./make-test-python.nix ({ pkgs, ... } : { }; nodes = { - server_mxisd = args : { + server = args : { services.mxisd.enable = true; services.mxisd.matrix.domain = "example.org"; }; - - server_ma1sd = args : { - services.mxisd.enable = true; - services.mxisd.matrix.domain = "example.org"; - services.mxisd.package = pkgs.ma1sd; - }; }; testScript = '' start_all() - server_mxisd.wait_for_unit("mxisd.service") - server_mxisd.wait_for_open_port(8090) - server_mxisd.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'") - server_ma1sd.wait_for_unit("mxisd.service") - server_ma1sd.wait_for_open_port(8090) - server_ma1sd.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'") + server.wait_for_unit("mxisd.service") + server.wait_for_open_port(8090) + server.succeed("curl -Ssf 'http://127.0.0.1:8090/_matrix/identity/api/v1'") ''; }) |