I’m quite biased here as I run Cachix, but that also gives me a quite a bit of time to talk to people and see their pain points.
Given the complexity IPFS brings to Nix (redesigning quite a bit of internals as well as APIs), I think we should make a case that it has to come with significant benefit to at least outweigh that.
Commenting on each of the thinks that would make Nix better:
Beating source bit-rot: sources can be stored and shared via IPFS so we don’t lose the data needed to reproduce builds.
This could be already done with current design.
Distributing builds via IPFS: builds can be distributed peer-to-peer, so a popular cache could have less hosting costs as it grows.
Storage costs of IPFS are much higher than a typical centralized storage (at the current pricing of providers), so I find this to be unlikely. So some numbers are needed to back this off.
Content-addressed derivations: RFC 62 is necessary for using IPFS to its full potential, so we’ll be working with existing community efforts towards content addressibility.
That is cool! Seems like more a dependency for IPFS.
Trustless remote building: Nix users shouldn’t need to be trusted to utilize remote builders. The internal changes to Nix which we need for IPFS support get us most of the way there, so we’ve gone ahead and included this feature as part of our plan.
I’d love to hear more about this, my understanding is that’s only true if derivation is binary reproducible, which we still have a very long way to go.
My main concern is really how performant it would be.
The direction I want to take with Cachix is to have specified binary cache API that allows dynamic queries so that one query can answer everything Nix needs to build further. That’s going to be hard to beat with P2P and it’s a requirement for Nix to have good UX.
All in all, IPFS is a wild dream, but the actual benefit/complexity ratio is quite low in my opinion. P2P software comes at incredible complexity overhead.
That is to say that trying and seeing what could be done is great and I do hope I’m wrong.