Skip to content
Jan Schmitt edited this page May 20, 2022 · 6 revisions

Firstly, make sure you are running the latest version of nix/nixpkgs and check there are no known issues. Because of the way system impurities are isolated, nixpkgs often needs some changes to handle forwards compatibility.

Upgrading your machine will reset system files and break existing configuration, this means shell configuration in /etc and system services will be lost. Luckily easy to get back up and running. Just like a fresh installation, bashrc and other shell configuration files might have to be moved aside first since nix-darwin won't overwrite existing files.

sudo mv /etc/bashrc /etc/bashrc.orig
sudo mv /etc/zshrc /etc/zshrc.orig
sudo mv /etc/zprofile /etc/zprofile.orig
sudo /nix/var/nix/profiles/system/activate
exit  # Start a new shell to reload the environment.

This will activate your last configuration again, after this your system is ready and nix should be fully operational again.