Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a UUID instead of volume name for fstab on Mac #215

Merged

Conversation

Hoverbear
Copy link
Contributor

Description

Fixes #212.

Before we were using a volume name for the /etc/fstab entry for the Nix Store, while this worked on our testing Macs, it was insufficiently robust for "Real" Macs.

This introduces a new Darwin-only action called CreateFstabEntry which inquires with diskutil info ${LABEL} for a UUID and then sets that in the /etc/fstab.

Unfortunately adding a test for this is rather hard since we can't reboot CI macs.

Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

@Hoverbear Hoverbear added the upload to s3 The labeled PR is allowed to upload its artifacts to S3 for easy testing label Jan 30, 2023
@Hoverbear Hoverbear self-assigned this Jan 30, 2023
@Hoverbear Hoverbear requested a review from cole-h January 30, 2023 20:39
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That aside, LGTM (but I don't have a Mac to comprehensively test this on, so maybe we should wait for someone who does?)

@Hoverbear Hoverbear added this to the v0.1.1 milestone Jan 31, 2023
@Hoverbear Hoverbear merged commit 23c453f into main Jan 31, 2023
@Hoverbear Hoverbear deleted the hoverbear/ds-645-macos-ventura-nix-is-empty-after-reboot branch January 31, 2023 16:49
@Hoverbear Hoverbear added the MacOS Darwin/MacOS label Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS Darwin/MacOS upload to s3 The labeled PR is allowed to upload its artifacts to S3 for easy testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

macOS Ventura, /nix is empty after reboot following clean installation
2 participants