Issue with installing nix after reverting from a time machine backup.
Hi! Getting the following issue. The suggested fix will work, I've tried it before, but I figured I should report it.
This occurs on restoring from a time machine backup on MacOS. From my recollection, it happens on installations with the same version, factory resetting, and restoring from the backup, but in this case, I backed up on MacOS 15.1 beta 2 and restored on MacOS 14.6.1 (23G93). However, I do remember running into it on identical macos sequoia versions on resetting and restoring from time machine.
Perhaps this could be handled automatically for the user's standpoint, with additional confirmation?
Error
Error:
0: Planner error
1: Error executing action
2: Action `encrypt_apfs_volume` errored
3: The keychain has an existing password for a non-existing "Nix Store" volume on disk `disk3`, consider removing the password with `sudo security delete-generic-password -a "Nix Store" -s "Nix Store" -l "disk3 encryption password" -D "Encrypted volume password"`. Note that it's possible to have several passwords stored, so you may need to run this command several times until receiving the message `The specified item could not be found in the keychain.`
Backtrace
Location:
src/cli/subcommand/install.rs:200
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
2: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
3: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
4: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
5: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
6: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
7: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
8: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
9: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
10: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
11: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
12: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
13: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
14: __mh_execute_header<unknown>
at <unknown source file>:<unknown line>
Seems unhelpful, but maybe it means something.
Metadata
| key | value |
|---|---|
| version | 0.20.2 |
| os | macos |
| arch | aarch64 |
Just to make sure I understand the issue: this happens when you install Nix, then revert to a past time machine backup (without Nix), and then try to install Nix again, right?
I'm somewhat hesitant to automate these kinds of "destructive" commands... Are you mostly coming from a place like "this is kinda obnoxious to do every time I restore to a time machine backup", or somewhere else?