Skip to content

macOS installer breaks an existing nix-installer volume, spins forever, and mishandles a root-only synthetic.conf #16447

Description

@EclipseIsDead

Describe the bug

I first installed nix from nix-installer before running the nixos.org curl command to install. I'm running all this on a macOS machine. At the step:

---- sudo execution ------------------------------------------------------------
I am executing:

$ sudo /usr/sbin/diskutil unmount force Nix Store

to unmount the encrypted volume

Volume Nix Store on disk3s7 force-unmounted

the terminal froze, cpu usage spiked and i had to kill the process. I believe what happened was:

  1. nix-installer made an unencrypted "Nix Store" volume and a plain diskutil mount launchd job, and a fstab line
  2. this curl does not refuse to run over that because its "already installed" check is a warning that keys off nix-env being on PATH, and my machine didn't
  3. so it found the existing volume, saw file vault installed on but the volume unencrypted, and asked whether to encrypt it
  4. it then generated a random password and stored it in the System keychain
  5. diskutil apfs encryptVolume on said store, and force-unmounted it
  6. it then reached the polling for /nix to come back, but nothing remounted an encrypted volume, so it just stalled

Steps To Reproduce

  1. macOS 15, FileVault on install Nix with nix-installer
  2. Run sh <(curl -L https://nixos.org/nix/install).
  3. Answer yes to "Should I encrypt it and add the decryption key to your keychain?".
  4. Observe.

Expected behavior

Either refuse to run on a system installed by nix-installer, OR repair the existing volume without breaking its mount configuration, fail fast with a message when the volume does not come back, and then handle a root-only synthetic.conf.

Metadata

  • nix-env --version: 2.35.2 installer over an existing 2.35.1 (nix-installer) install
  • macOS 15 (Darwin 25.1.0), aarch64-darwin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions