Ca-derivations: Difference between revisions

Roberth (talk | contribs)
Using CA derivations: It is very different and needs to be opt-in, certainly at the Nix level, probably also at the Nixpkgs level
Don't say that an unstable nix is required; this is long since available on stable releases
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
== Setting-up Nix for CA derivations ==
== Setting-up Nix for CA derivations ==


Being still an experimental feature, CA derivations are currently only available on unstable Nix versions, and require an explicit opt-in.
Being still an experimental feature, CA derivations currently require an explicit opt-in.


=== On NixOS ===
=== On NixOS ===
Line 29: Line 29:


It is also possible to mark all the derivations as content-addressed by default, by passing <code>config.contentAddressedByDefault = true</code> as argument to nixpkgs.
It is also possible to mark all the derivations as content-addressed by default, by passing <code>config.contentAddressedByDefault = true</code> as argument to nixpkgs.
Be warned that although there’s a [https://hydra.ngi0.nixos.org/jobset/ca-test/nixpkgs hydra instance testing ''some stuff''], it’s not a channel blocker, and [https://cache.ngi0.nixos.org its associated binary cache] won’t contain nearly as many things as <code>cache.nixos.org</code>. So doing so will probably entail rebuilding most of your system yourself, and you ''might'' encounter some unexpected breakages.
To use the binary cache <code>cache.ngi0.nixos.org</code> to speed up your builds, merge the following into your <code>nix.conf</code>:
<pre>substituters = https://cache.ngi0.nixos.org/
trusted-public-keys = cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=</pre>
== Ensuring that a derivation is properly content-addressed ==
== Ensuring that a derivation is properly content-addressed ==