7 ms·
Nix (and nix-darwin for persistent config) already does the job for non-GUI apps better than anything else could (its catalog is unmatched), and homebrew (also
by lambdaba 1y ago
Nix (and nix-darwin for persistent config) already does the job for non-GUI apps better than anything else could (its catalog is unmatched), and homebrew (also available in nix-darwin) handles GUI apps.
- jokethrowaway 1y agoComing from nixos, I didn't want to use brew but I found nix-darwin to be poorly documented and supported. Several upgrades wrecked havoc on my system, a lot of things didn't work as expected, I had to package a lot of stuff; eventually I just bit the bullet and started using homebrew
- lambdaba 1y agoI sort of get what you're saying and I've had a few sporadic issues myself, once or twice I had to reinstall (although might have been my mishandling), but overall I can't see a better solution than this. Plus I can share the configs with Linux.
- deleted 1y ago[deleted]
- cosmic_cheese 1y agoI doubt nix is ever going to enjoy popularity on the scale of Homebrew due to its differing model. People are too used to doing a simple “x install y” without any backing configuration or flakes or anything like that. Personally speaking I might learn it at some point but for now nix's friction/overhead isn’t proportional to the occaisional inconvenience with traditional package managers.
- lambdaba 1y agoI think Nix has a marketing issue as it goes so deep. But if you're going to consider it only as an alternative to homebrew, you don't have to know anything aside from different CLI invocations: `nix-shell -iA <package>` to install, and maybe a step up with `nix-shell -p <package> --run <cmd>` to run without installing. You don't have to use nix-darwin or managing configs and the Nix language at all.
- cosmic_cheese 1y agoThat’s still more to remember than `x install y`, which might sound trivial but that’s the exact kind of friction that impedes adoption. Maybe it would make sense for nix to add a mode that basically aliases that first command to `nix install <package>`.
- drcongo 1y agoThat's essentially what Devbox does for you as a package manager, a hand wrapper around nix for using nix just for its package ecosystem.
- lambdaba 1y agoOh yeah, I knew about devbox but hadn't seen (perhaps it's new) that it can handle global packages: https://www.jetify.com/docs/devbox/devbox_global/ https://www.jetify.com/docs/devbox/devbox_global/
- lambdaba 1y agoYeah, I'm just addressing you specifically, you could switch easily and Nix has a much larger package selection (outside of GUI apps on macOS). And it immediately can do more via nix-shell -p, which can be also be used as shebang. But yeah, Nix is much more than a homebrew replacement and that has its downsides.
- verdverm 1y agoNix may have a larger selection, but I sampled a few of the projects I install from homebrew and... 1. Did't actually exist 2. Outdated version 3. Incorrect build I'll keep the quality of Homebrew packages over the quantity in Nix
- lambdaba 1y agoI'm curious of what the packages are because I only have ~10 packages that I use from homebrew, either very Mac-specific or that have better packaging (ffmpeg, mpv)
- koito17 1y agoBefore getting a new MacBook, I was using MacPorts since Homebrew had several problems, including what the GP mentioned. For over a year now, I have used home-manager with Nix. Nixpkgs has the "important" subset of GUI programs that I use. Major exception to this is OrbStack, but there is a homebrew-to-nix converter that I use to handle that. I briefly experimented with nix-darwin, but concluded that it was overkill for my needs. Home Manager also has the benefit of not being Mac-specific (so plenty of questions and examples exist online). Most importantly, I no longer have to mentally prepare myself when updating Mac OS. If I recall correctly, both MacPorts and Homebrew require the user to re-install all installed packages after a major version update, but this problem doesn't really exist on Nix. It's also nice being able to store flakes in a Git repository and effortlessly rollback changes or replicate a whole development environment across several machines.
- lambdaba 1y agoI'm interested in how you use that homebrew-to-nix converter, if you have links to configs or can describe it briefly! I agree that nix-darwin is a bit overkill, I mainly use it for the homebrew integration, but I think so is home-manager, I don't keep user app configs in Nix since they are never exhaustive and more effort than it's worth.