DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs.
GNU Lesser General Public License v2.1
1.8k stars 48 forks source link

Running installer on macOS over conventional installation #843

Open NReilingh opened 4 months ago

NReilingh commented 4 months ago

I installed nix the conventional way, and then wanted to see if the determinate installer would properly activate flakes over this installation. I think there could be a bug in the logic which generates this error; the Nix Store volume is operating normally and there is an encryption password for it in the Keychain.

Error

Error: 
   0: Planner error
   1: Error executing action
   2: Action `encrypt_apfs_volume` errored
   3: The keychain lacks a password for the already existing "Nix Store" volume on disk `disk3`, consider removing the volume with `diskutil apfs deleteVolume "Nix Store"` (if you receive error -69888, you may need to run `sudo launchctl bootout system/org.nixos.darwin-store` and `sudo launchctl bootout system/org.nixos.nix-daemon` first)

Metadata

key value
version 0.16.1
os macos
arch aarch64
NReilingh commented 4 months ago

Investigating a little bit --

https://github.com/DeterminateSystems/nix-installer/blob/58303b559872b2f8d476d23f1c0496374204b548/src/action/macos/encrypt_apfs_volume.rs#L38-L46

Determinate's call to security find-generic-password appears to pass -s Nix Store, when the keychain item created by the conventional installer can be retrieved with -s "$volume_uuid".

I'll leave it to a maintainer to determine if these are meant to be compatible or not.