5 ms·
It seems kind of wild that "installing some binaries on my system" requires these sorts of crazy workarounds like Launch Deamons. I'd personally love something
by georgelyon 3y ago
It seems kind of wild that "installing some binaries on my system" requires these sorts of crazy workarounds like Launch Deamons. I'd personally love something like nix that would live nicely in a low-privilege folder somewhere in my user directory, just to install the few tools I need for a particular project. Currently I can achieve this with VSCode devcontainers and Docker low-privilege install. For system-wide tools I just download prebuilt binaries...
- Cu3PO42 3y agoI agree, the lengths the Nix installer currently goes to really shouldn't be required. However, this particular issue isn't about binaries being deleted. The Nix installer sets up some environment variables for you (in particular includes its binaries in PATH). For a system wide installation, it modifies /etc/zshrc for lack of a better option. Now, macOS likes to restore /etc/zshrc to its default on upgrades, thus breaking the environment variables. IMO this is no-one's fault except macOS.
- pxc 3y agoThe issue is trivial to diagnose and resolve if you understand the basics of shell startup and how Nix relies on bog-standard Unix features like PATH. But it's a real annoyance, and the kind of thing that could turn off or confuse new and casual users. And workarounds like this are not unusual on macOS, where upgrades verge on developer-hostile and user-expected behaviors are often impossible without hacks.
- josephcsible 3y agoYou mean it's trivial to work around. Only Apple can truly resolve it.
- pxc 3y agoRight, it's trivial to restore the mangled configuration files, but permanently resolving the issue of OS upgrades blasting away user configuration files is on Apple.
- neon_electro 3y agoThank you for the heads up about that when upgrading
- grhmc 3y agoThat issue is exactly what we've fixed in this release of the Determinate Nix Installer, though, so if you use it today you should be covered for future upgrades :).
- hamandcheese 3y agoIMO part of the blame also lies with the way the nix store was designed. Nix can only work in the way you would want with the store located at /nix/store. This misfeature makes single-user, less privileged nix quite hard to pull off even on Linux.
- grhmc 3y agoLuckily newer builds of nix can be made statically that live in ~ and use namespaces to make it work. However, that doesn’t work on macOS at all :(.
- pxc 3y agoThis seems like an overstatement to me, at least when it comes to the practicalities rather than the machinery. Single-user, unprivileged Nix wasn't very hard for me as an undergraduate student a decade ago, and there are much better options for achieving that nowadays.
- lamontcg 3y agoApple blowing the PATH away in /etc/zshrc and then overwriting it on every upgrade is user-hostile even outside of Nix.
- deleted 3y ago[deleted]