Switch to UID 351+ and GID 350 on macOS #24
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
macOS Sequoia will release on Monday and break the majority of existing installations as well as all new ones using the current UIDs/GID. The ecosystem is standardizing on UIDs 351+ for the build users and GID 350 for new installations on macOS. Current installations can keep the old GID but must have their UIDs migrated for Sequoia compatibility.
See https://github.com/NixOS/nix/pull/10919 and https://github.com/NixOS/nix/pull/11075 for where the values were settled upon (with some help from an Apple devrel) and a shell migration script was implemented (which should work for Lix users at a pinch).
This has already been implemented upstream in Determinate Systems’ installer and they are working on a command to repair existing installations; see https://github.com/DeterminateSystems/nix-installer/issues/1115. Hopefully you can backport their change ASAP so that new installations work after Sequoia’s release, and the repair command is meant to ship Thursday or earlier. I’m not sure if you’re in a position to signal users that their installation will break before it does, but I’m currently implementing that in nix-darwin. (It would be helpful to know if there is a canonical way to detect whether an installation was installed with
lix-installer
, esp. to disambiguate it from the Determinate Systems installer.)This would fix #18, but I wanted to track the more concrete thing here especially since it’s high‐priority.
Note also that existing installs are fine to remain on GID 30000. The move to GID 350 at the same time was to solve a cosmetic problem with the Nix build user group showing up in System Settings, and for consistency with the UIDs. The upstream migration script does not change the GID because of worries about interfering with existing file ownership in
/nix
. I don’t know what Determinate Systems’ plans are regarding group migration, but I would expect the same.blegh. thank you for reporting this.
This issue was mentioned on Gerrit on the following CLs:
https://github.com/DeterminateSystems/nix-installer/pull/1143 has now been merged; @jade I think backporting that would probably be a better approach than backporting the Nix shell script.
Happy to point Lix users to it from the nix-darwin error message; do you know of a reliable way to distinguish a setup installed with the Determinate Systems installer from one installed with the Lix installer?
check for /nix/lix-installer
Hmm, I thought that https://gerrit.lix.systems/c/lix-installer/+/1502 hadn’t yet landed so it was still installing as
/nix/nix-installer
?#[tracing::instrument(level = "debug")]
async fn copy_self_to_nix_dir() -> Result<(), std::io::Error> {
let path = std::env::current_exe()?;
tokio::fs::copy(path, "/nix/nix-installer").await?;
tokio::fs::set_permissions("/nix/nix-installer", PermissionsExt::from_mode(0o0755)).await?;
Ok(())
}
fuck i feel so burned out
If the change is backported, assuming the Lix installer will be able to repair installations originally made with the DetSys installer, then I'd recommend checking whether
nix.package
is nix or lix as I expect there are a lot of folk like me who did a DetSys installation originally and then subsequently adopted Lix.I’m working on backporting the repair command.
https://gerrit.lix.systems/c/lix-installer/+/1912 should do it. (Though I’ve only built it, not tested.)