abathur
September 16, 2024, 3:29pm
1
Apple released macOS 15 Sequoia today–and beta users previously reported that this update breaks existing Nix installs by clobbering _nixbld1-4
(because macOS now includes system daemons that use the same UIDs).
On existing installs, this should manifest as an error when you run some Nix commands:
error: the user '_nixbld1' in the group 'nixbld' does not exist
You can read more about this issue–including how to migrate your install before or after you take the update–in this issue:
opened 07:47PM - 11 Jun 24 UTC
installer
macos
The macOS 15 Sequoia update takes 4 UIDs in the range we've been using, clobberi… ng any _nixbldN users in the way (typically _nixbld1-4).
This manifests as:
- On existing installs, build errors like: `error: the user '_nixbld1' in the group 'nixbld' does not exist`
This repo now has a migration script (which relocates/replaces _nixbld users) that you can run _before or after_ taking the macOS 15 Sequoia update:
```
curl --proto '=https' --tlsv1.2 -sSf -L https://github.com/NixOS/nix/raw/master/scripts/sequoia-nixbld-user-migration.sh | bash -
```
> *Caution*: If you installed Nix with a third-party installer, you should check with them for additional/different instructions.
- On fresh installs (with unpatched installer versions), the following error creating user `_nixbld1`:
```
<main> attribute status: eDSRecordAlreadyExists
<dscl_cmd> DS Error: -14135 (eDSRecordAlreadyExists)
```
While the 2.24.6 installer is fixed, older installers don't all work at the moment. (The installer fixes for this _have_ been backported for every release back to the 2.18 series--but these aren't quite released yet.)
If you're trying to install 2.20.0 or newer, you can explicitly override the starting UID:
```
NIX_FIRST_BUILD_UID="351" sh <(curl -L <whatever release-specific installer URL you need>)
```
If you run into this error with versions older than 2.18, you'll need to download the installer tarball for your platform, unpack it, and update the first UID in `install-darwin-multi-user.sh` to 351.
<details><summary>More background/context on the issue</summary>
Edit: As the macOS release is near, I'm tucking context away to focus the first comment on how users can fix broken installs.
Reports are percolating about the upcoming macOS Sequoia 15 (from people trying the beta out) using 4 UIDs in the range we've been using:
- https://github.com/NixOS/nix/issues/6153#issuecomment-2159403590
- https://github.com/NixOS/nix/issues/6153#issuecomment-2161284555
- https://mastodon.social/@ryanbooker/112597391954278800
History on our previous change and ID range selection is in:
- #4532
- #4531
PRs to address:
- installer fix: #10919
- migration script to fix existing installs w/o reinstalling: #11075
</details>
9 Likes
An update has been put out that tries to fix the solution for existing nix you should now get a warning in nix when you update saying you need to migrate. But yet it’s not yet fixed in nix install: Installing on MacOS fails when user UID is already in use · Issue #2242 · NixOS/nix · GitHub