Skip to content

[OSX catalina] install script fails if a volume starting with [nN]ix.* already exists #4150

@johnalotoski

Description

@johnalotoski

Describe the bug

  • The nix catalina install script will fail if a user happens to have a volume already named with a regex pattern of [nN]ix.* since the find_nix_volume() function of the create-darwin-volume.sh script uses this pattern match to determine if a nix store has already been created.

Steps To Reproduce

  • Install catalina with a fresh drive, APFS, case-sensitive (as an example). Name the volume something like: nixify-me.
  • Once installed, try installing nix:
sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
  • It will fail because it sees nixify-me and believes the appropriate volume for the nix-store has already been created.

Expected behavior

  • The install to work.

Additional context

  • Ironically, my behavior of naming the Catalina block device volume for what I intended to do with it unwittingly caused the failure :).
  • So others don't stumble upon the same fail, it may be good to:
    • Make the regex match more stringent. For example, the script creates a volume having a label starting with Nix Store, so why not pattern match on that?
    • Add a line or two in the manual detailing what the volume name will be if created, and what it is looking for to check for if it already exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions