We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1bb9ac commit 3aa5a47Copy full SHA for 3aa5a47
modules/nginx.nix
@@ -88,6 +88,13 @@ in
88
];
89
90
config = lib.mkIf cfg.enable {
91
+ assertions = lib.mkIf cfg.setHSTSHeader (lib.attrValues (lib.mapAttrs (host: hostConfig: {
92
+ assertion = hostConfig.root == null;
93
+ message = let
94
+ name = ''services.nginx.virtualHosts."${host}"'';
95
+ in "Use ${name}.locations./.root instead of ${name}.root to properly apply .locations.*.extraConfig set by services.nginx.setHSTSHeader";
96
+ }) cfg.virtualHosts));
97
+
98
boot.kernel.sysctl = lib.mkIf cfg.tcpFastOpen {
99
# enable tcp fastopen for outgoing and incoming connections
100
"net.ipv4.tcp_fastopen" = 3;
0 commit comments