macOS Catalina was just released today. What’s the current status of Nix on it? I remember a while ago seeing that there were issues with the filesystem changes, did that get resolved?
I found the issue on this
It sounds like this is still an open problem.
I just upgraded to Catalina. The updater deleted the
I’ve just read the long thread about
/nix on GitHub (I wish I would have read it before upgrading…).
The updater deleted the
You can find your
/Users/Shared/Relocated Items/Security/nix… now to go read the GitHub thread myself and see about this whole read-only root filesystem thing.
You can find your
Following the instruction on the GitHub issue, I was able to create an (unencrypted) partition for Nix mounted on a “synthetic”
/nix directory. Then I copied the
var directores from
/Users/Shared/Relocated Items/Security/nix to
Not trivial, but I now have a working Nix installation again.
I’m also back up and running. I listed exactly what I did in this comment. All’s well.
I suspect anything that installs system-wide LaunchDaemons (@LnL7’s nix-darwin?) might have a bit more trouble (see NixOS/nix#3125 for issues with
nix-daemon in a multi-user install), but it should be surmountable, and there are reasonable workarounds involving
wait4path — basically, the contents of
/nix/ aren’t available at boot, so launchd can’t load plists that are just symlinks into the Nix store).
I’ve cobbled together a procedure (from all the useful tips on #2925) that allowed me to have Nix working on first boot after upgrading to Catalina from Mojave with a multi-user Nix setup. Thought it might be helpful to others, so I figured I’d link it here: /nix will not be writable on macOS Catalina · Issue #2925 · NixOS/nix · GitHub
Only half on topic, but how has anyone who has taken the dive on a daily-driver found living with Catalina+Nix (and are you using nix-darwin?) so far? I’ve seen more grousing than usual with Catalina (e.g.: Broken | Hacker News) so I’ve been planning to stay on Mojave for a bit.
I did a fresh install of Catalina, but had no problems with nix, nix-darwin or home-manager other than having to setup
/run. Upgrading seems to have fixed a display corruption issue I encountered occasionally and I haven’t encountered any further problems except some apps needed updating for different reasons.
Could you tell me how you setup
/run on a fresh install of Catalina?
Did you end up getting Nix installed on a fresh install of Catalina?
It looks like this is the solution for /nix.
To create a /run for nix-darwin — assuming you’re looking to use it — seems that the following is the right thing:
printf 'run\tprivate/var/run\n' | sudo tee -a /etc/synthetic.conf
Followed by a reboot. Use
man synthetic.conf for more info.
I just followed effectively those exact steps earlier today on a new machine, just for single-user install instead of multi-user install. So far it seems to be working fine.
I guess that I should switch to single-user. I now have a multi-user install and rebooting/updates (I don’t know which of the two, because I only reboot when I update) nukes the global profile modifications and for some reason unloads the nix-daemon launchctl file
This is because in Nix 2.3 the launchctl file is symlinked into the store, and launchd loads its jobs before the volume mounts, so launchd skips this one as it can’t resolve the symlink. You can copy it in place instead of symlinking, but the job itself then needs to use
nix-daemon for the same reason. Both are fixed on master: (1) (2)
Thanks for the pointers! I haven’t been using my MacBook much lately, so I haven’t kept up.