nix-installer icon indicating copy to clipboard operation
nix-installer copied to clipboard

Enter a password to unlock "Nix Store"

Open Untersander opened this issue 5 months ago • 1 comments

I had the exact same issue mentioned in #1498 and I tried the debugging steps as mentioned by @cole-h.

Running the command from the plist file from the macos default terminal resultet in the following error:

MacBookPro% /usr/bin/security find-generic-password -s "Nix Store" -w |  /usr/sbin/diskutil apfs unlockVolume "Nix Store" -mountpoint "/nix" -stdinpassphrase
Unlocking any cryptographic user on APFS Volume disk3s7
Error unlocking APFS Volume: Couldn't mount disk (-69842)

I tried manually unlocking the disk with the password from the disk3 encryption password in the System Keychain, which did not work either.

What finally worked for me is unlocking the disk manually with the Nix Store password stored in the login Keychain

I'll try to reproduce the issue again and let you know if i can. If i can reproduce it, I'll try to debug it more, but I'm not that familiar with macOS internals, so I would be happy about any pointers where you think the problem could be @cole-h.

Untersander avatar Jul 20 '25 20:07 Untersander

I've messed with it a little bit and could only once reproduce it and the second time the problem was solved by using the disk3 encryption password, interestingly the password of Nix Store from the login keychain and the disk3 encryption password are now the same what they didn't used to be when i first started debugging this issue. Nix Store changed the what disk3 encryption password is.

I've also messed about with access control removing every allowlisted app and the only one that seems to really need access is APFSUserAgen on the Nix Store password and no app is allowlisted for disk3 encryption password.

Untersander avatar Jul 20 '25 20:07 Untersander