Distributed build: Difference between revisions
imported>Lheckemann |
imported>Endgame Add troubleshooting section; document bug wrt distributing builds as a user on NixOS. |
||
| Line 77: | Line 77: | ||
</nowiki>}} | </nowiki>}} | ||
{{Evaluate}} | {{Evaluate}} | ||
See the [https://nixos.org/nix/manual/#chap-distributed-builds Nix Manual] for the exact signification of each option. | See the [https://nixos.org/nix/manual/#chap-distributed-builds Nix Manual] for the exact signification of each option. | ||
| Line 82: | Line 83: | ||
{{Expansion|untested}} | {{Expansion|untested}} | ||
The previous method should be rather easily adaptable: replace adding NixOS options by editing <code>/etc/nix/nix.conf</code>. | The previous method should be rather easily adaptable: replace adding NixOS options by editing <code>/etc/nix/nix.conf</code>. | ||
==== Note ==== | |||
Because of bug {{Issue|46038}}, you need to set <code>nix.distributedBuilds = true;</code> in <code>configuration.nix</code> ''even if'' you are triggering a distributed build via the command line. | |||
== Using remote builders == | == Using remote builders == | ||
| Line 108: | Line 112: | ||
To know what features a derivation needs, you can run {{Commands|$ nix show-derivation /nix/store/hash-foo.drv | grep requiredSystemFeatures}} | To know what features a derivation needs, you can run {{Commands|$ nix show-derivation /nix/store/hash-foo.drv | grep requiredSystemFeatures}} | ||
== Troubleshooting == | |||
* How do I know if I'm distributing my build at all? | |||
** Run <code>nix build</code> with <code>--max-jobs 0</code>. | |||
* How do I know why my builds aren't being distributed? | |||
** Run <code>nix build -vvvvvvvvv 2>&1 | less</code> and search for <code>decline</code>. | |||
* I can <code>nix ping-store</code> but the build doesn't distribute. | |||
** If on NixOS, Check that <code>nix ping-store</code> command works when run as root. | |||
* I can ping the store as root, but I'm getting "broken pipe" errors when trying to distribute. | |||
** You may have hit bug {{Issue|46038}}. Add <code>nix.distributedBuilds = true;</code> to <code>configuration.nix</code> and <code>nixos-rebuild switch</code>. | |||
== See also == | == See also == | ||