4 ms·
I want to like Nix but those installation instructions for macOS (and their removal friend) are just crazypants as compared to the `sudo mkdir /nix && sudo chow
by mdaniel 3y ago
I want to like Nix but those installation instructions for macOS (and their removal friend) are just crazypants as compared to the `sudo mkdir /nix && sudo chown $USER /nix` from the Linux version
And that's not even getting into the "waaa?" from `du -hs /nix` although I am open to that being a misleading number due to hardlinks and other trickery that du may not correctly surface
- abathur 3y agoTry running `sudo mkdir /nix && sudo chown $USER /nix` on modern macOS.
- yjftsjthsd-h 3y ago> And that's not even getting into the "waaa?" from `du -hs /nix` although I am open to that being a misleading number due to hardlinks and other trickery that du may not correctly surface Are you running garbage collection? It gets out of hand if you keep all versions, but you don't need to do that
- faitswulff 3y agoThe Determinate Systems nix installer is quite smooth: https://github.com/DeterminateSystems/nix-installer/ https://github.com/DeterminateSystems/nix-installer/ Though it does tend to get clobbered on macOS updates.
- iFreilicht 3y agoYeah, that's a long-running and pretty much unfixable issue as macOS updates overwrite /etc/zshrc. AFAIK, the determinate systems installer does somewhat resolve this as you can just run it again and it will fix the issue. The default installer is not idempotent yet (and my work on trying to resolve that has stalled, unfortunately, see https://github.com/NixOS/nix/pull/7603 https://github.com/NixOS/nix/pull/7603), so trying to run it again to fix this issue will result in errors.
- faitswulff 3y agoYeah, I generally uninstall (with the remaining nix-installer binary on the nix volume) and then reinstall. It would be great if the installer were idempotent and I could just re-run the installer!
- 0x69420 3y agoare we reading the same instructions? i struggle to see what makes a curlbash leading into a few interactive prompts “crazypants”; it's the same story with brew and gentoo prefix
- pxc 3y ago> And that's not even getting into the "waaa?" from `du -hs /nix` although I am open to that being a misleading number due to hardlinks and other trickery that du may not correctly surface Nope, du counts hardlinks correctly when it encounters the same inode multiple times in the course of fulfilling a single invocation. per https://ss64.com/osx/du.html https://ss64.com/osx/du.html : > Files having multiple hard links are counted (and displayed) a single time per du execution. Nix's disk usage profile is pretty similar to Flatpak's, or to a collection of closely related Docker containers. The difference between no Nix install and having one isn't huge. But your first installed Nix package will pull in very low level common dependencies— on Linux, everything between whatever application and the kernel (and on macOS, a bit less). Your next application will come with a smaller increase. Once you have a handful of programs installed, you no longer have big downloads for individual additions. When you have a lot installed, the difference isn't that huge, proportionally. Over time, your Nixpkgs version will rotate and you can end up with deps from old versions of Nixpkgs, which can take up a lot of extra space. But that's easy enough to manage by pinning Nixpkgs. If you ever uninstall programs, Homebrew's broken uninstallation functionality can very quickly make a Homebrew installation much (up to several times) larger than the equivalent Nix one once you have more than a handful of packages installed.