Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://nixos.org/download.html#nix-install-macos

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.



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


> 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.


The Determinate Systems nix installer is quite smooth: https://github.com/DeterminateSystems/nix-installer/

Though it does tend to get clobbered on macOS updates.


Yeah, 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), so trying to run it again to fix this issue will result in errors.


Yeah, 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!


Try running `sudo mkdir /nix && sudo chown $USER /nix` on modern macOS.


> 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


are 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


Yes, the Homebrew message does seem unnecessarily hostile. Not everyone can afford to buy a brand new computer every year.


One of the problems with OSS burnout is this many-to-one relationship with the users and maintainer. It’s sort of like the relationship between an outfielder and the bleacher crowd at a baseball game.

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.


It's not burnout. The homebrew team have been insufferable and egotistical for a long time.

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-...


This is very reductive. For anyone not familiar with the story, Howell's experience at Google was the original source of the "Invert a binary tree on the whiteboard" meme. Opinions on his experience were all over the map, with very thoughtful people defending Google and other thoughtful people criticizing them.

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).


I am glad that there are people like Max Howell who write such (for me) great package managers. In opposite to what you write, here in a quote reply he comes across as very friendly: https://www.quora.com/Whats-the-logic-behind-Google-rejectin... PS: if really a lot of Googlers use brew I hope they also generously support the project (do. Apple)


Great as in ‘I’ve never tried anything else’ great?


choco, apt, zypper, MacPorts


This seems a little exaggerated?

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".


The "period of time" isn't what was hostile.


Edit: nevermind


I wish there were a macOS (and Homebrew) "extended support" edition with security patches for 10 years rather than 7.

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.


If the expected pattern holds, macOS Monterey will be getting security updates for another year.


Completely agree. I have two perfectly good but now unsupported 5K iMacs from 2015 and 2017 in my household, both don't get any more upgrades. Heck, I would even pay up to 100 EUR/USD for longer support. But that's probably not a viable business case for Apple anymore.


Have you tried to install some Linux distro (like Fedora or Ubuntu) on it? If your workflow allows it, of course. I found how well Linux works on my relatively old Apple hardware. And I can use it most of the time, just need to learn some new tools, as many I’m familiar with are macOS only.


I know my way around Linux, as a server OS at least. The issue with switching is more about my previous investment in buying and learning dozens of third-party apps. I also must say that I value the integration between macOS and iOS a lot.

Once my (i)Macs stop receiving security updates though, I might try a Linux distro, just to give them a second life.


By upgrades you mean upgrades that change the major OS version, right?

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.


Indeed, and I hope Ventura will get at least two years of security fixes.

It's still my impression, that the 2017 Macs (sold by Apple well into 2018), should have made the cut for Sonoma. I don't even care about any of the new features. I'm more interested in bug and security fixes. So hopefully I have more time to hunt for the perfect display that can adequately replace the 5K 27" of my current setup. And I know there is the Studio Display. But that one is too expensive for me.


The lack of an iMac 5K replacement is basically the reason why I'm preparing to leave Macs and the whole apple ecosystem behind. As far as I'm concerned, when the main use of your computer is focused around text, because of Apple technological choice when it comes to scaling for HiDPI display you need a 5k27" display if you don't to want compromise in macOS. Otherwise with a cheaper 4k display your choices are between a much reduced workspace or get constant font blurriness. Windows doesn't have this problem and I say that as someone who has historically prefered how macOS handle fonts (still do but only on capable hardware).

The way I see things Apple is completely responsible for this problem and should also be responsible for providing a decent solution at a reasonable price.

But currently the cheapest option (Basic M2 Mac Mini + Studio Display + Keyboard & Mouse) 2642€ instead of the previous 2100€ (inflation is unhinged in Apple land) and on top of being much more expensive for a way more locked down configuration (previously RAM was freely upgradable and SSD upgrade was involved but doable) it is not faster in a way that match the price increase or even better than what Intel has been doing. In fact the truly faster is mostly single thread performance (42% better), multicore is a just bit faster (21%) and GPU is actually slower (-14%). In other words : for much more money you gain a bit not in way that is change what it possible to do with the computer but you also lose in a way that make some things you could do before worse (gaming and generally). That is on a

Lifelong customer, got my first own mac at 15, which was an ibook and also my first personal computer at all. I also bought the second gen ipod (first gen didn't get much availability in france) and even imported the first gen iPhone


I too have been looking into what can replace the 5K 27" iMac display, because my 2017 5K iMac display has developed a column of bad pixels about 30% in from the right side.

It's been that way for about a year and a half now and has not gotten any worse so I don't think I'm in any danger of suddenly needing a new Mac. The way my iMac happens to be on my desk I'm directly in front of a spot about 30% in from the left and most of my main focus is on the left side, so the bad pixels aren't too annoying.

The 27" 5120 x 2880 display has definitely spoiled me. I want something with a similar density and not much bigger or smaller than 27".

These seem to be the choices currently:

1. Apple Studio Display. As you've noted it is expensive. It also comes with a stand that does not have a height adjustment. Add $400 to get it with Apple's height adjustable stand. (Or for $0 get it with Apple's VESA mount adaptor instead of the standard stand, and buy your own stand. If you can find a VESA compatible height adjustable stand for less than $400 this is cheaper than buying Apple's stand).

One thing to not if like me you would really like a monitor that you can keep using for a very long time is that in 2021 Apple made a change to AppleCare. It used to be that you could buy at most a small fixed number of years of AppleCare. Now you can keep renewing AppleCare indefinitely.

For the Studio Display it is $49.99 per year. If the Studio Display is fine for someone except for the price, it might be worth considering if that plus $49.99 per year, which should let you keep it working for a long time, would make it worth it.

2. LG UltraFine 27MD5KL [1]. Supposedly this is the same LG panel that Apple used in the 5K 27" iMacs. Just under $1300. Seems to get good reviews.

3. Samsung ViewFinity S9 [2]. This is new. $1600 so same as Apple's price for the Studio Display, but the S9 is height adjustable and VESA compatible so no paying extra if you want height adjustability.

[1] https://www.bhphotovideo.com/c/product/1500040-REG/lg_27md5k...

[2] https://www.bhphotovideo.com/c/product/1760795-REG/samsung_l...


LG UltraFine 27MD5KL is on my shortlist. One downside is that it hasn't been updated in a while. Upside is, you can get them second hand for 30-40% less than it currently retails for.

The Samsung display seems nice. But how long is Samsung going to support the devices OS? The price is also not competitive in my opinion. For 1600 I would prefer the Studio Display, even if it's not height adjusted.

I will probably wait for the next Mac mini model with the M3 SOC. Luckily I'm not in a hurry.


Have you explored https://github.com/dortania/OpenCore-Legacy-Patcher?

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.


I used Dosdude's patches to install Mojave on a 2011 Mac mini. That worked well. Thanks for mentioning OpenCore-Legacy-Pather. I have it on my radar, just didn't have the time to look into it more thoroughly.


Those peasants are bound to suffer the wrath of planned obsolescence.

macOS could be a modular rolling release, but you need to milk the peasants from time to time


Not everyone can afford supporting old OSes.


My issue with Nix is that you are forced to install packages in a global location. Why is it that every package manager assumes I’m an administrator on my machine? Even if I am, how does it make sense to take over a global directory as a single user?


Nix leverages hardcoded paths inside the binaries and other outputs it builds in order to ensure determinacy. Nix packages are not always trivially relocatable. Consequently, reliance on the binary caches means different users have to rely on the same path to the Nix store, since it's part of all those outputs.

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!


I have a bad habit of writing user-mode when I mean 'unprivileged' in the sense of 'not as root' and I don't think the word really works that way. I did it again here! Whoops.


Nix does not require you to be an administrator to install a package though!


I think he may be referring to installing Nix itself, which does require root even if the intention isn't to install anything system-wide. I did once think about modifying the nix installer to let me set an arbitrary nix store because I wanted nix packages in a docker container I was debugging, but never really got around to it. Let me know if you know of somebody else who tried this.


So this is possible, but there are a lot of caveats. First, the installer itself explicitly says:

```

# 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`)


Now that's interesting. I use Homebrew in a similar way. It does mean I have to compile a lot of things from scratch, but Homebrew has knowledge of which packages are relocatable and which aren't, so I get to use binary "bottles" for about 25% of the packages I install. I'll have to give this a try.


Homebrew is the same, there is no good way to have Homebrew installation shared among multiple users on a single machine, much less to have separate packages for each of them.


> ...there is no good way...

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.


Only true for MacOS though, Linux supports a proper single-user no-root install.


Interesting. Would you mind elaborating? I'd love to give this a try, but I'm not having luck finding documentation on how to do it.



Try pkgsrc. You can run it wherever you like, as an unprivileged user.


Is there a good guide on how to replace homebrew with nix? I've been curious for a while but always end up with 30 tabs open and giving up.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: