Created
May 17, 2020 14:05
-
-
Save ghedamat/25c671a02923dbac6c140afe54276f9e to your computer and use it in GitHub Desktop.
Nix on MacOS catalina workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# taken from https://github.com/NixOS/nix/issues/2925#issuecomment-539570232 | |
#1. Check if /nix exists. | |
# If not, run | |
echo 'nix' | sudo tee -a /etc/synthetic.conf | |
#then reboot. | |
#2. Create an APFS volume for Nix: | |
sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix | |
sudo diskutil enableOwnership /nix | |
sudo chflags hidden /nix # Don't show the Nix volume on the desktop | |
echo "LABEL=Nix /nix apfs rw" | sudo tee -a /etc/fstab | |
#3. Install Nix: | |
sh <(curl https://nixos.org/nix/install) | |
#4. configure nix | |
# ensure that the following line is in your bashrc or zshrc, depending on which you use | |
if [ -e /Users/YOURUSERNAME/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/YOURUSERNAME/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer | |
# open a new terminal window and run these commands | |
nix-channel --add https://nixos.org/channels/nixos-20.03 nixos | |
nix-channel --add https://nixos.org/channels/nixos-20.03 nixpkgs | |
nix-channel --update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment