by n8henrie · 3y ago · 0 comments
The homebrew team seems incredibly burnt-out, to the point of hostility. I've really enjoyed the nixpkgs community so far and encourage others to check it out; it hasn't replaced homebrew entirely for me (yet), but it's getting closer every day.
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 :
> 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.
Though it does tend to get clobbered on macOS updates.
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), so trying to run it again to fix this issue will result in errors.
Are you running garbage collection? It gets out of hand if you keep all versions, but you don't need to do that
Maintainers get requests to do things they have no interest in, like maintaining software for OSes past a certain date. That doesn’t sound so bad, but there are a lot, and they can even be mean. The maintainer can block these users individually, but it’s different users all the time, so that doesn’t stop it.
So, the maintainer addresses the user base, the whole crowd all at once. The problem is most of these users haven’t seen these interactions, so the message seems hostile. Having someone say “I owe you nothing.” seems really weird when you’ve never asked them for anything. Or, if they list of all the ways and reasons for you to not contact them it looks hostile. The users don’t see the fan next to them throwing a beer can at the center fielder.
Max Howell (founder of homebrew) went to interview at Google, shoved a coding exercise back in their faces, made a snotty comment about how all the engineers at Google using Macs use his code and how dare they blah blah greatest engineer in the world blah blah, and walked out the door.
That coding exercise was likely given to him precisely because all the google engineers had a lot of experience using brew, or they did it as ego check to see if he'd be insufferable to work with.
Howell failed to realize that and instead went and bragged about it on twitter, almost certainly confirming for the hiring committee that things had worked exactly as designed.
Whole lot of fucking sass from a man who either didn't care or didn't know about the security implications of making a directory in the default path user-writeable, thus making probably hundreds of thousands of developer's systems less secure:
https://infotoast.org/site/index.php/2021/05/30/homebrew-is-...
And for what it's worth, Howell did say he regretted his tweet, and that he wasn't up to snuff technically (in the Quora link in a sibling comment to this one).
Macos 12 will run on most Macs from 2015 and later.
8 year old hardware isn't Earth shattering, but it's also not a "hostile" period of time for a non-commercial open source project to support. And it's certainly not "new hardware every year".
Old Macs are often perfectly usable in terms of hardware, but macOS security updates have left them behind.
As of today, it's likely that the 2016 Mac I'm writing this on (which can run Monterey but not Ventura or Sonoma) is out of support.
Of course the Mac apocalypse will be when x86 support is dropped, possibly starting in the next macOS release.
Those both should still be getting security updates. Ventura just updated to 13.6 this morning, Monterey updated to 12.7 a few days ago, and Big Sur updated to 11.17.10 a little over two weeks ago.
Big Sur is expected to stop getting security updates in a couple months. Monterey will probably get them until sometime in the last quarter of 2024, which would be the end of the line for 2015 5K iMacs. 2017 5K iMacs should get Ventura security updates through the last quarter of 2025.
I have used it before and, in my experience and everyone else I know who has used it, the vast majority of time the newer versions run absolutely fine with no issues. Occasionally some newer features don't work, but I'd but confident that 2015/2017 iMacs would be able to run the latest version no problem.
macOS could be a modular rolling release, but you need to milk the peasants from time to time
You can build Nix with a custom store prefix and run it that way if you're willing to build from source.
In practice, Linux users don't really have to contend with that tradeoff because you can relocate a Nix store wholesale using a bind mount, or a user namespace (unprivileged chroot), or various fakeroot tricks to run a Nix store in your homedir as if it lives in /nix. Unfortunately macOS just doesn't have any of those mechanisms.
If macOS some day gets first-class container support and, consequently, relevant user-facing primitives for user-mode chroot, then unprivileged, cache-friendly Nix installation methods for macOS will doubtless follow. I hope both happen!
```
# Please don't change this. We don't support it, because the
# default shell profile that comes with Nix doesn't support it.
readonly NIX_ROOT="/nix"
```
I haven't seen any configurations where the entire /nix is relocated, but nix _does_ support relocating the store with the environment variable `NIX_STORE_DIR`.[1]
However, this means that you can no longer use the the binary cache and *everything* you install has to be compiled from scratch, including glibc. The reason is that nix usually patches paths like `/bin/myprogram` to `/nix/store/1238f...-myprogram-1.2.3/bin/myprogram` in everything that depends on `myprogram` during build time to isolate the build outputs from the system. If you change your store, all those paths will now be invalid, including the hash part.
So using a nix store that isn't `/nix/store` is possible, but I don't think anyone is actually doing it except in a few select scenarios.
You can also compile nix itself with a different root. That will work as expected, but you still have the issue that you need to compile everything you install yourself.
[1]: https://nixos.org/manual/nix/stable/command-ref/env-common.h... (you can also relocate most other directories. The `prefix` in the paths is `/nix`)
Agreed, but it's at least possible. My usual install is just cloning Homebrew to ~/homebrew and setting up a symlink. It's far from ideal, due to the number of packages I need to build from source, but it works, and it's allowed me to function normally in tightly controlled environments.
As far as I can tell, the initial installation for Nix doesn't allow this, though iFreilicht pointed out some options that I haven't seen before, so I may be wrong.