Seconded. I have a mostly CLI setup and in my experience Nix favors that on Mac, but nonetheless it makes my Nix and Linux setups a breeze. Everything is in sync, love it.
Though if you don't like Nixlang it will of course be a chore to learn/etc. It was for me.
Really? This surprises me. I've used them for projects and for my home-manager setup and it's always been amazing at it. The best example I can come up with is packaging a font I needed into a nix package for a LaTeX file. It would have taken me a month of trying various smaller projects to know how to do that.
Honestly it helped quite a bit. There are a lot of obscure (imo) errors in Nix that LLMs spot pretty quickly. I made quite a bit of progress since using them for this.
If you don't mind me asking, why do you prefer this set up over just using brew?
I've poked around articles and other posts about this, but I'm not sure I quite get it.
If I just need to install packages, would brew just work for me?
I have a collection of bash scripts in my dotfiles for setting things up, and I've been meaning to adapt them for my linux laptop. It seems like Nix may be helpful here!
The big thing is undoing: if I want to uninstall something, I delete it from the text file and rerun my nix init. I also just decided to get more serious about having all my aliases and shell functions in source control, but then I need to be able to guarantee that I have my little dependencies like fzf, jq, fd, etc. Another option for those is to write the shell functions in nix-script so that they require their command line utilities when run for the first time. The other reason is that it makes me more disciplined about per-project dependencies. I use nix flakes for all my little projects too, so I end up with a project owning its npm or rails installs and database binary and database data and… you get the idea. It takes like 20 more minutes to get coding on something if I set it up that way but I let the LLMs handle that part. It's not quite "make the AI do the dishes while I make art" but it's pretty close!
Highly recommend doing nix + nix-darwin + home-manager to make this declarative. Easier to futz around with.