From 3cca4e91054a4d2bb5335feb19138362ce0fe417 Mon Sep 17 00:00:00 2001 From: Siddarth Kumar Date: Thu, 28 May 2026 16:53:25 +0530 Subject: [PATCH] nix: fix fetching of crates which now require agent overlay --- flake.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 3f6a3dc..ad41bba 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,16 @@ "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs stableSystems; - pkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); + # crates.io's WAF returns 403 for the default `curl/X.Y.Z` User-Agent. + fetchurlUserAgentOverlay = final: prev: { + fetchurl = args: prev.fetchurl (args // { + curlOptsList = (args.curlOptsList or []) ++ [ "-A" "logos-storage-nix" ]; + }); + }; + pkgsFor = forAllSystems (system: import nixpkgs { + inherit system; + overlays = [ fetchurlUserAgentOverlay ]; + }); in { packages = forAllSystems (system: let