Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Latest commit

 

History

History
54 lines (39 loc) · 1.76 KB

README.md

File metadata and controls

54 lines (39 loc) · 1.76 KB

Keep Nix working on macOS after system updates

Important

Determinate Systems has upstreamed the fixes in this repo. So this is no longer needed.

This is a fix for when Nix breaks after macOS system updates. It installs a LaunchDaemon that will run on system boot and fix the broken /etc/zshrc and /etc/bashrc files. You can also run it manually.

How to use the fixer

Fix manually without installing.

# If you already had Nix installed and it is already broken,
# you will need to first source nix into your current shell.
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'

# Then you can run the fixer. Note this will prompt for your password
# as it needs to run as root.
nix run github:mrhenry/nix-darwin-fixer -- fix

# Now open a new shell and you should be good to go.
nix --version

Install the fixer as a LaunchDaemon

# If you already had Nix installed and it is already broken,
# you will need to first source nix into your current shell.
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'

# Then you can run the fixer. Note this will prompt for your password
# as it needs to run as root.
nix run github:mrhenry/nix-darwin-fixer -- install

# Now open a new shell and you should be good to go.
nix --version

Uninstall the fixer

# This will remove all files installed by the installer.
nix run github:mrhenry/nix-darwin-fixer -- uninstall

Reading Material