-
Notifications
You must be signed in to change notification settings - Fork 91
Description
This issue appears related to #1498, which is currently locked.
Hi everyone, I found a potential fix for the persistent "Nix Store" password prompt on boot on macOS.
UUID=$(diskutil info "Nix Store" | awk '/Volume UUID/ {print $3}')
# This command helps diagnose the issue:
# sudo log show --info --debug --last boot | grep $UUID
FUTURE="2099-12-31 23:59:59"
defaults write com.apple.APFSUserAgent "$UUID" -dict-add DontUnlockVolume "$FUTURE"I'm not entirely familiar with macOS internals, so I asked an AI assistant to help interpret the logs. Its analysis suggests that APFSUserAgent attempts to unlock the encrypted Nix Store volume before the Determinate daemon, which leads to the password prompt:
Before applying the fix, the output of
sudo log show --info --debug --last boot | grep $UUIDshows thatAPFSUserAgentaggressively attempts to unlock theNix Storevolume. This hinders thenixdLaunchDaemon from decrypting and mounting the volume in the background. By adding this specific entry tocom.apple.APFSUserAgent, we force the agent to ignore theNix Storevolume.
In my local tests, the annoying password prompt no longer appears. Since my macOS environment is not a fresh install, I would appreciate it if others could help verify if this is a correct fix.