Hard to describe in one phrase other than to say:
NixOS is to Linux as Unison is to Haskell
Content-addressing used in the context of programming languages in the service of solving the problem of distributed systems and their inability to share code across time and space.
Haskell has a content-addressed module that was perhaps influenced by Unison.
Here’s an excellent interview with one of the authors of Unison:
I do this on NixOS. I have a NAS at home where I store most of the files I work on. My computers are internally immutable and almost all the files that change reside solely on the NAS as NFS shares. All of my computers are configured to auto-mount one of its folders at boot. NixOS sees that as an internal drive.
Then, simply navigate to the project folder where I have a flake and a .envrc file containing the command
use flake .
which will make direnv use Nix to provision the dependencies automatically. Whenever I save, those changes are reflected on all computers.I like to also version control everything using git and this method allows that transparently.
The only part that I am missing is getting the permissions to align between all computers accessing that same folder. Sometimes I have to create a temp folder that uses rsync to keep up with any changes. If anyone has any pointers, I’m all ears. It rarely gets in my way but does rear its head sometimes. Otherwise, this setup is perfect when I’m at home.