I’ve just discovered the safe network, still poking around to see if it’s the right fit for my app–so I have a lot of ignorance re: context here. Sorry if this is out out place.
Here’s why I think nix is worth it:
Support is being added ([RFC 0133] Git hashing and Git-hashing-based remote stores by Ericson2314 · Pull Request #133 · NixOS/rfcs · GitHub) which will let nix users reference packages by git hash instead of by the URL of github/gitlab/whatever. This excites me because it means that you can bring new determinism to code that might otherwise be problematic to reference in a distributed context, and you have a consistent way of referencing calls into it in a transparent, memoizable and partition-tolerant way (i.e. you don’t don’t have to talk to github as long as someone nearby has the bits).
You don’t have to be building software, you’re building consistent execution environments. You could be building proofs or simulation outputs or trained models.
Imagine a user that asserts somewhere:
fetch repo/ref sha256:aaaaaaaaaaa
, name it X
get data sha256:bbbbbbbbb
, name it in a file: Y
using the root repo of X do this: nix run Y
hash stdout from the above command, you’ll get sha256:ccccccc
So that’s a tuple of hashes representing a function call: ("aaaaaaaaaaa", "bbbbbbbbb", "ccccccc")
and users can verify it by running the above steps (in a sandbox which becomes network-disabled as soon as nix is done fetching its inputs, which are hash-pinned in the flake.lock
in the repo).
If someone you trust has already verified that the function defined in the tuple is pure and indeed has ccccccc as the output (given bbbbbbbbb) you can skip verification it and just fetch the output directly. Otherwise, you have everything you need to verify it so that your friends don’t have to.
One can imagine using this to create a mesh of memoized verifiable function calls which derive some useful result, and that’s what my app is about.
So that was a lot of words, sorry. My point here is that repeatable builds have utility between users of distributed systems, even if those systems are running on components that are not built in a repeatable way.
For me, that makes it worth embracing repeatable-builds life everywhere, because once you’ve paid the initial cost of figuring nix out (which, admittedly, is high) you might as well benefit from it everywhere that you can.
Besides, your developers who don’t like nix can always just ignore it continue configuring their system to match what they’re developing. You don’t have to declare the flake.nix
authoritative until you’re convinced it’s actually useful.