I have been trying to install nix, tried a lot of different approaches, not one is working, can someone help me with what exactly I need to do.
I tried: sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
I get error apfs.utils -B flag, since -B flag is no more supported
With other installation instructions, I was getting error about read only /nix
The installer should be:
- trying both the old apfs.util -B flag, and the new apfs.util -t flag
- swallowing the output from both invocations
https://github.com/NixOS/nix/blob/8803753666023882515404177b08f3f8bdad52a0/scripts/create-darwin-volume.sh#L30-L41
The fact that you are seeing this output makes me wonder if sh
is an unexpected shell.
Can you run and report the output of:
For type -a sh
sh is /bin/sh
And for sh --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin20) Copyright (C) 2007 Free Software Foundation, Inc.
No surprises there, unfortunately.
What macOS version does sw_vers
report?
A full log of the install run may also help.
Finally able to do it, with some pointers from comments on 2925 issue
sudo vi /etc/synthetic.conf
sudo diskutil apfs addVolume disk1 APFSX Nix -mountpoint /nix
sudo diskutil enableOwnership /nix
sudo chown -R <username> /nix
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
This sequence worked for me