diff --git a/.github/workflows/pr-main_l2.yaml b/.github/workflows/pr-main_l2.yaml index 953fe016303..4f4f2712854 100644 --- a/.github/workflows/pr-main_l2.yaml +++ b/.github/workflows/pr-main_l2.yaml @@ -530,6 +530,18 @@ jobs: - name: Set up Nix uses: cachix/install-nix-action@v31 + with: + # crates.io 403s any User-Agent containing "curl/", which is what Nix's + # fetchurl sends by default, breaking crate downloads during the image + # build. In multi-user (daemon) mode the FOD builds run under the + # nix-daemon and don't see the caller's environment, so override the + # User-Agent via impure-env (honored because the runner is a trusted + # user). Use curl's glued short option `-A`: a single space-free + # token that survives impure-env's space-separated parsing and + # fetchurl's unquoted word-split (curl rejects the --user-agent=value form). + extra_nix_config: | + extra-experimental-features = configurable-impure-env + impure-env = NIX_CURL_FLAGS=-Aethrex-ci+https://github.com/lambdaclass/ethrex - name: Set up QEMU run: | diff --git a/.github/workflows/pr-main_l2_tdx_build.yaml b/.github/workflows/pr-main_l2_tdx_build.yaml index 4147581943a..cb3c4ae54cf 100644 --- a/.github/workflows/pr-main_l2_tdx_build.yaml +++ b/.github/workflows/pr-main_l2_tdx_build.yaml @@ -49,6 +49,18 @@ jobs: - name: Set up Nix uses: cachix/install-nix-action@v31 + with: + # crates.io 403s any User-Agent containing "curl/", which is what Nix's + # fetchurl sends by default, breaking crate downloads during the image + # build. In multi-user (daemon) mode the FOD builds run under the + # nix-daemon and don't see the caller's environment, so override the + # User-Agent via impure-env (honored because the runner is a trusted + # user). Use curl's glued short option `-A`: a single space-free + # token that survives impure-env's space-separated parsing and + # fetchurl's unquoted word-split (curl rejects the --user-agent=value form). + extra_nix_config: | + extra-experimental-features = configurable-impure-env + impure-env = NIX_CURL_FLAGS=-Aethrex-ci+https://github.com/lambdaclass/ethrex - name: Build image run: |