1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

add script to migrate macOS 15 Sequoia nixbld UIDs

While we don't have any easy way to forcibly notify everyone about the
impending breakage (or forcibly migrate the users on their system),
this script enables those who do hear about the problem to migrate
their systems before they take the macOS update.

It should also enable people who only discover it after the update
when a build fails to ~fix their installs without a full reinstall.
This commit is contained in:
Travis A. Everett 2024-07-18 09:56:57 -05:00
parent caabdb06d1
commit 0fabb348ba
2 changed files with 146 additions and 19 deletions

View file

@ -2,7 +2,7 @@
((NEW_NIX_FIRST_BUILD_UID=301))
id_available(){
id_unavailable(){
dscl . list /Users UniqueID | grep -E '\b'"$1"'\b' >/dev/null
}
@ -15,7 +15,7 @@ change_nixbld_names_and_ids(){
while read -r name uid; do
echo " Checking $name (uid: $uid)"
# iterate for a clean ID
while id_available "$next_id"; do
while id_unavailable "$next_id"; do
((next_id++))
if ((next_id >= 400)); then
echo "We've hit UID 400 without placing all of your users :("