-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"/var is a symlink" error on macOS when using nix-env -iA
under root
#10247
Comments
@edolstra I've seen a similar error on NixOS when using |
The same happens on
|
I guess @edolstra (see the blame log above) would be the best person to get a comment from, once they are able to answer, and it also looks like a feature. The thing is: 1 at least until someone has figured out how to properly re-seal System volume, mimicking the behaviour of Apple restore and update ramdisks which use I had partial success with it, being able to create sealed snapshot with properly matched However macOS (unsurprisingly) refused to boot, bawling at me with accusations of sticking my nose too far into not my business. Fair enough. At this point, it also starts looking more like an adult hackery: reversing SEP mailbox API and APFS volume personalisation (creating and/or signing APFS keybags using known TSS protocol) might be ways to go. On the other hand, tampering with APFS itself, e.g. creating a
Both contain C struct decls, so having got a grasp on it, one can get away with |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/error-path-home-is-a-symlink/42267/4 |
Fixes DeterminateSystems/nix-installer#912 and probably #10247. (cherry picked from commit 09551fa)
Fixes DeterminateSystems/nix-installer#912 and probably #10247. (cherry picked from commit 09551fa)
Is it something being looked at, already; and if yes, may I wonder what the branch is? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2023-03-27-nix-team-meeting-134/42961/1 |
@ink-splatters This is supposed to be fixed in 2.20.6. |
@edolstra is there a tutorial on how to upgrade it when it is on a broken state? |
@jaysonsantos I just did bump into this on my machine, I got it handled by using Not sure though if that's a sane approach, hope this might help you get going again. |
@jaysonsantos below is how I fixed it by installing from scratch kudos @edolstra (ik bedoel, Dankjewel!!!) and other guys at Determinate Systems: I have just tried new nix-installer which has become much more mature, verbose if I want it to be, and eventually worked like a charm! ❤️ NOTE: NIX_INSTALLER_NIX_PACKAGE_URL is needed because the bundled nix version is too old You will want at least 2.20.6 (according to #10247 (comment)) I chose the last tagged one: 2.21.2 installationNOTE: This is a recipe for clean install! I disrooted old NOTE: Fix your arch/version accordingly, if on Linux NOTE: running by unprivileged user will ask for root. I didn't check if the env is passed by installer, so I rooted me myself sudo -i
cd /tmp
curl -sL -o nix-installer https://install.determinate.systems/nix/nix-installer-aarch-64-darwin
chmod +x ./nix-installer
export NIX_INSTALLER_NIX_PACKAGE_URL=https://releases.nixos.org/nix/nix-2.21.2/nix-2.21.2-aarch64-darwin.tar.xz
./nix-installer assuming nix-channel --update 🪄✨ |
@ink-splatters Thanks, will close the issue! |
Describe the bug
if legacy profile is configured under root user, packages installation fails because of new check for symlinks
Steps To Reproduce
nix-env --version
outputAdditional context
It looks like an implemented feature (please see below), which makes me a bit worried: the use case might be really rare, but in my likely unpopular configuration (installing globals under root, because In Sandbox We Trust!:) this resulted in enrolling in to flakes, which I'm fine with when I need it and not when I'm forced to.
Why I mentioned this: I can anticipate that the affected scenario is not priority for the team as / if it concerns the minority of users, which is fair reason to postpone it or close with WONT FIX.
These are my 2 cents in order for my voice to be heard: I'd rather like this to be fixed :)
I actually could have submitted a PR instead of an issue, but I guess this is about a choice made and if this choice is immutable, or on the contrary - it's just merely a bug and the installs like mine take place around.
The text was updated successfully, but these errors were encountered: