Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only disable nginx ETags if etag patch is missing
Since NixOS/nixpkgs#48337 we no longer have the issue that we get the same ETags for different store paths but the hash of the store path is now the ETag. This means, that we no longer need to disable caching if the patch is applied to nginx. Unfortunately, the patch is only in NixOS Unstable at the moment, hence the conditional on whether the patch exists. Even if the patch is backported to 19.03, we'd still need it in 18.09, which we currently still support as well. In order to apply the patch for eg. NixOS 19.03, something like this needs to be put in the system configuration: { pkgs, lib, ... }: { # ... other configuration definitions services.nginx.package = pkgs.nginx.overrideAttrs (drv: { patches = (drv.patches or []) ++ lib.singleton (fetchurl { url = "https://raw.githubusercontent.com/NixOS/nixpkgs/master/" + "pkgs/servers/http/nginx/nix-etag-1.15.4.patch"; sha256 = "0w7sbvfrf0s20lyfr99r5d13rd97nd3c4n569n9ldy7a1r7nx019"; }); }); # ... other configuration definitions } Signed-off-by: aszlig <aszlig@nix.build>
- Loading branch information
0984a0b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration example for applying the patch is actually wrong, here is the correct way to add the patch: