5 ms·
Your hunch is exactly right. macOS upgrades typically do precisely that and it's quite annoying. I work at Determinate Systems as a full-time macOS user and it'
by biggestlou 3y ago
Your hunch is exactly right. macOS upgrades typically do precisely that and it's quite annoying. I work at Determinate Systems as a full-time macOS user and it's one of those things I kind of quietly tolerated and didn't give much thought, but having this fixed removes a real headache.
- Cu3PO42 3y agoRight! It's great to see that tackled for potentially all Nix installations! I have a workaround for that particular issue in my nix-darwin and Home-Manager configurations, but I've always disliked that I needed one in the first place. While we're speaking of things I need workarounds for: having my login shell be Nix-installed currently has a race condition on systems with FileVault. I have, for example, iTerm2 configured to resume on reboot and it will start before the Nix partition is mounted, thus complaining that it cannot exec my shell. My workaround entails placing a thin wrapper on the main partition that simply waits for /nix to be mounted and then `exec`ing the right shell binary depending on the invoking user. I should probably open an issue about this, but I'm not sure it can be solved at all while `/nix` needs to be on a seperate volume.
- grhmc 3y agoHmmm... would you mind opening an issue over here[1]? We have seen some related issues that might dovetail nicely. 1. https://github.com/determinateSystems/nix-installer https://github.com/determinateSystems/nix-installer
- Cu3PO42 3y agoI will do tomorrow! In the meantime, on the offchance anyone stumbles across this who has the same problem, my workaround is available here [0]. (Also exported as `darwinModules.chsh` from my Flake) [0] https://github.com/Cu3PO42/gleaming-glacier/blob/master/modules/darwin/chsh/default.nix https://github.com/Cu3PO42/gleaming-glacier/blob/master/modu...
- xp84 3y agoCan someone ELI5 why someone would want to do this system-wide installation? Are there that many developers who log in to do their development as multiple different users? Also, is this mandatory for Nix to work? Personally I prefer to even store regular Mac apps I download in ~/Applications, and anything I can install without disturbing system-global stuff, I prefer to do that way. It means I can migrate things completely by copying one directory, rather than using an "Installer" in the Windows tradition.
- Nullabillity 3y agoNix packages refer to each other using absolute paths. The convention is to put them in /nix/store, but technically this base path (the "nix store") be changed to whatever you want. However, changing it requires all (non-leaf) packages to be rebuilt to refer to the new path. That also means that you won't be able to use the central package cache anymore, and you effectively get The Gentoo Experience. The default path could be changed too, of course, but putting it under your home directory would mean that you could only share cached packages with other people that share your username. It would also break NixOS, since that uses Nix to manage the entire system. > It means I can migrate things completely by copying one directory, rather than using an "Installer" in the Windows tradition. Nix ships with a specific tool for copying packages (including dependency trees) between computers, nix-copy-closure. But this also assumes that the store path is the same.
- eviks 3y ago> However, changing it requires all (non-leaf) packages to be rebuilt to refer to the new path. Do you know whether Nix has a proposal to fix that big ease-of-relocation issue via path rewriting? Afaik Spack package manager builds with padded paths so those can then be rewritten to practically any install path
- Nullabillity 3y agoI haven't kept up actively with core proposals, so I don't know. But I'd doubt it since there's no way to do this generically.. even if you rewrite all paths referring to /foo to instead refer to /bar, that wouldn't cover hashed strings, and would be difficult to do in a way that would make binary formats happy (even if you pad it, `/foo\0\0\0` and `/foo` aren't universally equivalent).