Starting with Catalina, the root file system becomes read-only. This breaks the basic Nix installation procedure for those on macOS, that is to say
sudo curl -L https://nixos.org/nix/install | sh
no longer works on Macs.
The Nix community has come up with solutions to the problem, and, according to Introduction the recommended way to install Nix on macOS Catalina is
sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
This does not work.
What exactly do I mean by that?
I am investigating the possibility of using Nix in the context of a scientific research project. I believe that Nix has much to offer in this context, not only in terms of reliable reproducilble builds, but also for automated provision of development environments.
A significant portion of the people involved in this project use macOS. However great the aforementioned benefits might be, if there is no simple, reliable and well-documented way of installing Nix on Macs, then this whole idea will be stillborn, because the people involved are first and foremost scientists, and only incidentally developers, and therefore have a relatively low tolerance for such obstacles. It will be difficult to convince them that the pain is worth the eventual rewards.
So, when I say “This does not work” I mean that the first Mac-using guinea-pig collaborator who kindly volunteered some time to humour my “try-this-Nix-thing” whim, was unable to install Nix on Catalina using the recommended procedure … meanwhile the internet, as of today, tacitly implies that This Just Works and offers no further help. Yes, the manual goes into details of alternative possibilities, but if my scientific collaborators read this, they will only be convinced that we should stay away from Nix, because it introduces complexities which they don’t need.
I do not have a Mac myself, so it’s very difficult to investigate or offer further advice.
Does anyone have any experience with installing Nix on Catalina? Do you have any complementary information on the process? Any hints about troubleshooting?
Can we create some resources for helping others through this process?
My personal short-term fear is that, if reliably installing Nix on Macs has become significantly more complicated than the one-liner shown above, then Nix is simply not a viable solution for projects such as this. And that would be a great shame, because I really do believe that Nix has so much to offer here.