@@ -37,7 +37,7 @@ If you want to prevent Athens from writing to disk, you can instead configure it
}
```
To use the local proxy in Go builds, you can set the proxy as environment variable:
To use the local proxy in Go builds (outside of `nix`), you can set the proxy as environment variable:
```nix
{
@@ -47,6 +47,21 @@ To use the local proxy in Go builds, you can set the proxy as environment variab
}
```
It is currently not possible to use the local proxy for builds done by the Nix daemon. This might be enabled
by experimental features, specifically [`configurable-impure-env`](https://nixos.org/manual/nix/unstable/contributing/experimental-features#xp-feature-configurable-impure-env),
in upcoming Nix versions.
To also use the local proxy for Go builds happening in `nix` (with `buildGoModule`), the nix daemon can be configured to pass the GOPROXY environment variable to the `goModules` fixed-output derivation.
This can either be done via the nix-daemon systemd unit: