Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
/ nix-darwin-fixer Public archive

Keep Nix working on macOS after system updates

License

Notifications You must be signed in to change notification settings

mrhenry/nix-darwin-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Keep Nix working on macOS after system updates

Topics

Resources

License

Stars

Watchers

Forks