How to move nix store to external drive on macos?

This is why I said to update /Library/LaunchDaemons/org.nixos.darwin-store.plist to specify the new volume’s UUID.

I’ll also reiterate that this will be more complicated for anyone trying to follow along with FileVault enabled. In that case, the installer creates an encrypted volume and stores the passphrase in your system keychain (using the volume UUID) and generates a slightly different mounting service to request this passphrase and use it to decrypt the volume.

The external disk/volume may or may not be encrypted (i.e., it is up to you if you are manually generating the volume)–and you’ll need to square these parts if you adapt an existing install. If you don’t encrypt the volume, you can use the below as a reference for how to replace the command in /Library/LaunchDaemons/org.nixos.darwin-store.plist:

If you do encrypt your disk/volume, you’ll need to update the UUIDs in the plist and put the passphrase in the system keychain. You can see how the installer encrypts the volume and stores the credential in:

1 Like