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 996fc4c commit 5f4f228Copy full SHA for 5f4f228
modules/nginx.nix
@@ -90,7 +90,7 @@ in
90
91
config = lib.mkIf cfg.enable {
92
assertions = lib.mkIf cfg.setHSTSHeader (lib.attrValues (lib.mapAttrs (host: hostConfig: {
93
- assertion = hostConfig.root == null;
+ assertion = (lib.length (lib.attrNames hostConfig.locations)) == 0 -> hostConfig.root == null;
94
message = let
95
name = ''services.nginx.virtualHosts."${host}"'';
96
in "Use ${name}.locations./.root instead of ${name}.root to properly apply .locations.*.extraConfig set by services.nginx.setHSTSHeader";
0 commit comments