mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
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.
This commit is contained in:
parent
509be0e77a
commit
df36ff0d1e
2 changed files with 12 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
((NEW_NIX_FIRST_BUILD_UID=301))
|
((NEW_NIX_FIRST_BUILD_UID=350))
|
||||||
|
|
||||||
id_available(){
|
id_available(){
|
||||||
dscl . list /Users UniqueID | grep -E '\b'"$1"'\b' >/dev/null
|
dscl . list /Users UniqueID | grep -E '\b'"$1"'\b' >/dev/null
|
||||||
|
|
|
@ -4,7 +4,17 @@ set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# System specific settings
|
# System specific settings
|
||||||
export NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-301}"
|
# Notes:
|
||||||
|
# - up to macOS Big Sur we used the same GID/UIDs as Linux (30000:30001-32)
|
||||||
|
# - we changed UID to 301 because Big Sur updates failed into recovery mode
|
||||||
|
# we're targeting the 200-400 UID range for role users mentioned in the
|
||||||
|
# usage note for sysadminctl
|
||||||
|
# - we changed UID to 350 because Sequoia now uses UIDs 300-304 for its own
|
||||||
|
# daemon users
|
||||||
|
# - we changed GID to 350 alongside above just because it hides the nixbld
|
||||||
|
# group from the Users & Groups settings panel :)
|
||||||
|
export NIX_FIRST_BUILD_UID="${NIX_FIRST_BUILD_UID:-350}"
|
||||||
|
export NIX_BUILD_GROUP_ID="${NIX_BUILD_GROUP_ID:-350}"
|
||||||
export NIX_BUILD_USER_NAME_TEMPLATE="_nixbld%d"
|
export NIX_BUILD_USER_NAME_TEMPLATE="_nixbld%d"
|
||||||
|
|
||||||
readonly NIX_DAEMON_DEST=/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
readonly NIX_DAEMON_DEST=/Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||||
|
|
Loading…
Reference in a new issue