Home Explore Blog Models CI



nixpkgs

nixos/doc/manual/administration/network-problems.section.md
bc80f1dc4a527ec929f5a1e8880e7f2f4fbd29de6a5ca08b0000000300000349
# Network Problems {#sec-nix-network-issues}

Nix uses a so-called *binary cache* to optimise building a package from
source into downloading it as a pre-built binary. That is, whenever a
command like `nixos-rebuild` needs a path in the Nix store, Nix will try
to download that path from the Internet rather than build it from
source. The default binary cache is `https://cache.nixos.org/`. If this
cache is unreachable, Nix operations may take a long time due to HTTP
connection timeouts. You can disable the use of the binary cache by
adding `--option use-binary-caches false`, e.g.

```ShellSession
# nixos-rebuild switch --option use-binary-caches false
```

If you have an alternative binary cache at your disposal, you can use it
instead:

```ShellSession
# nixos-rebuild switch --option binary-caches http://my-cache.example.org/
```

Chunks
5fce486f (1st chunk of `nixos/doc/manual/administration/network-problems.section.md`)
Title: Nix Binary Cache Network Issues and Solutions
Summary
Nix utilizes a binary cache, by default `https://cache.nixos.org/`, to optimize package building by downloading pre-built binaries instead of compiling from source. Network issues preventing access to this cache can cause Nix operations to be very slow due to HTTP connection timeouts. Solutions include disabling the binary cache with `--option use-binary-caches false` or specifying an alternative cache using `--option binary-caches <URL>`.