FAQ: Difference between revisions

imported>Dustin
How to run a nix-shell with an unstable package
imported>Pancho
Line 290: Line 290:
== How can I disable the binary cache and build everything locally? ==
== How can I disable the binary cache and build everything locally? ==


Set the binary caches to an empty list: <code>nix.binaryCaches = [];</code> in _configuration.nix or pass ad-hoc <code>--option binary-caches ""</code> as parameter to nix-build or its wrappers.
Set the binary caches to an empty list: <code>nix.binaryCaches = [];</code> in <code>configuration.nix</code> or pass ad-hoc <code>--option binary-caches ""</code> as parameter to nix-build or its wrappers.


This is also useful to make simple configuration changes in NixOS (ex.: network related), when no network connectivity is available:
This is also useful to make simple configuration changes in NixOS (ex.: network related), when no network connectivity is available:


<syntaxhighlight lang="bash">nixos-rebuild switch --option binary-caches ""</syntaxhighlight>
<syntaxhighlight lang="bash">nixos-rebuild switch --option binary-caches ""</syntaxhighlight>
== How do I enable sandboxed builds on non-NixOS? ==
== How do I enable sandboxed builds on non-NixOS? ==