Skip to content

Commit df36ff0

Browse files
committed
install-darwin: fix _nixbld uids for macOS sequoia
Starting in macOS 15 Sequoia, macOS daemon UIDs are encroaching on our default UIDs of 301-332. This commit relocates our range up to avoid clashing with the current UIDs of 301-304 and buy us a little time while still leaving headroom for people installing more than 32 users.
1 parent 509be0e commit df36ff0

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

scripts/bigsur-nixbld-user-migration.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
((NEW_NIX_FIRST_BUILD_UID=301))
3+
((NEW_NIX_FIRST_BUILD_UID=350))
44

55
id_available(){
66
dscl . list /Users UniqueID | grep -E '\b'"$1"'\b' >/dev/null

scripts/install-darwin-multi-user.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ set -eu
44
set -o pipefail
55

66
# System specific settings
7-
export NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-301}"
7+
# Notes:
8+
# - up to macOS Big Sur we used the same GID/UIDs as Linux (30000:30001-32)
9+
# - we changed UID to 301 because Big Sur updates failed into recovery mode
10+
# we're targeting the 200-400 UID range for role users mentioned in the
11+
# usage note for sysadminctl
12+
# - we changed UID to 350 because Sequoia now uses UIDs 300-304 for its own
13+
# daemon users
14+
# - we changed GID to 350 alongside above just because it hides the nixbld
15+
# group from the Users & Groups settings panel :)
16+
export NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-350}"
17+
export NIX_BUILD_GROUP_ID="${NIX_BUILD_GROUP_ID:-350}"
818
export NIX_BUILD_USER_NAME_TEMPLATE="_nixbld%d"
919

1020
readonly NIX_DAEMON_DEST=/Library/LaunchDaemons/org.nixos.nix-daemon.plist

0 commit comments

Comments
 (0)