Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions overlays/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@

# Override opencode ahead of nixpkgs pin
(import ./opencode.nix)

# Inject User-Agent into fetchcrate so crates.io doesn't 403
(import ./fetchcrate-ua.nix)
]
16 changes: 16 additions & 0 deletions overlays/fetchcrate-ua.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Workaround for crates.io blocking bare curl User-Agents (HTTP 403).
# crates.io enforces a data access policy requiring descriptive User-Agents;
# nixpkgs fetchcrate sends none. Remove this overlay once upstream fixes it.
# https://crates.io/data-access
final: prev: {
fetchcrate = args:
prev.fetchcrate (args
// {
curlOptsList =
(args.curlOptsList or [])
++ [
"--user-agent"
"cargo/1.0 (nixpkgs; https://github.com/NixOS/nixpkgs)"
];
});
}
Loading