Skip to content

Potential fix for persistent "Nix Store" password prompt on macOS boot #1732

@YemingMeng

Description

@YemingMeng

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 $UUID shows that APFSUserAgent aggressively attempts to unlock the Nix Store volume. This hinders the nixd LaunchDaemon from decrypting and mounting the volume in the background. By adding this specific entry to com.apple.APFSUserAgent, we force the agent to ignore the Nix Store volume.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions