Skip to content

Instantly share code, notes, and snippets.

@eraserhd
Created February 5, 2020 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eraserhd/e0eb35339b99073f3537a956c38ee185 to your computer and use it in GitHub Desktop.
Save eraserhd/e0eb35339b99073f3537a956c38ee185 to your computer and use it in GitHub Desktop.
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:

/etc/synthetic.conf
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
$ export NIX_IGNORE_SYMLINK_STORE=1
$ darwin-rebuild switch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment