nginx: enable http3
This commit is contained in:
parent
03c32f38d0
commit
9df0260f15
2 changed files with 7 additions and 5 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ config, lib, ... }: with lib; {
|
{ config, lib, pkgs, ... }: let
|
||||||
|
inherit (lib) mkDefault;
|
||||||
|
in {
|
||||||
kyouma.deployment.tags = [ "web" ];
|
kyouma.deployment.tags = [ "web" ];
|
||||||
security.dhparams.enable = true;
|
security.dhparams.enable = true;
|
||||||
security.dhparams.params.nginx = {};
|
security.dhparams.params.nginx = {};
|
||||||
|
@ -11,7 +13,7 @@
|
||||||
};
|
};
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
#package = pkgs.nginxQuic;
|
package = mkDefault pkgs.nginxQuic;
|
||||||
|
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
add_header Referrer-Policy "same-origin" always;
|
add_header Referrer-Policy "same-origin" always;
|
||||||
'';
|
'';
|
||||||
createHost = vhostName: vhostCfg: {
|
createHost = vhostName: vhostCfg: {
|
||||||
extraConfig = (lib.optionalString (builtins.hasAttr "extraConfig" vhostCfg) vhostCfg.extraConfig) + "\n" + extraConfig;
|
extraConfig = lib.optionalString (builtins.hasAttr "extraConfig" vhostCfg) (vhostCfg.extraConfig + "\n" + extraConfig);
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
#kTLS = true;
|
#kTLS = true;
|
||||||
#http3 = true;
|
http3 = true;
|
||||||
#quic = true;
|
quic = true;
|
||||||
} //
|
} //
|
||||||
lib.optionalAttrs (!(builtins.hasAttr "useACMEHost" vhostCfg)) {
|
lib.optionalAttrs (!(builtins.hasAttr "useACMEHost" vhostCfg)) {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|
Loading…
Reference in a new issue