Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Upgrading to Catalina

Upgrading to Catalina

After an upgrade, many things will be broken. Here’s how to fix:

The Nix Store

Use sudo to create /etc/synthetic.conf and add the following two entries:

nix	/System/Volumes/Data/nix
run	private/var/run/

This tells Darwin to create /nix and /run symlinks in the root on next reboot.

The Catalina upgrade should have created a /Users/Shared/Relocated Items/Security/nix directory. Move it into its new place with the following command:

$ sudo mv /Users/Shared/Relocated\ Items/Security/nix /System/Volumes/Data/nix

Oddly, this command will return immediately even though the target folder does not yet exist — it can take several minutes to show up.

Wait for it to show up, then reboot.

Shell Config

nix-darwin will want to symlink the files in /run/current-system/etc/ to /etc/. Look in /run/current-system/etc/ to see which files need to be renamed in /etc/, for example:

$ sudo mv /etc/bashrc{,.orig}
$ sudo mv /etc/zprofile{,.orig}
$ sudo mv /etc/zshenv{,.orig}
$ sudo mv /etc/zshrc{,.orig}

Edit your configuration.nix and ensure that you have this:

  environment.variables.NIX_IGNORE_SYMLINK_STORE = "1";

Source your current shell’s rc file, and rebuild the config:

$ . /run/current-system/etc/bashrc
$ darwin-rebuild switch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment