I use it to install a bunch of Homebrew casks and a small number of regular packages to support those casks. It works perfectly well!
My biggest annoyance is that Homebrew is really slow; the Homebrew part of my Nix-Darwin rebuilds usuay takes 3-5x as long as everything else combined. Homebrew is really slow even when it has nothing to do.
The only caveat worth mentioning is that the module built into Nix-Darwin doesn't support installing Homebrew itself. Instead you tell it the prefix for an existing Homebrew installation.
(There is an out-of-tree module for installing Homebrew as well, but I haven't tried it.)
Make sure you are disabling auto-update and auto-upgrade for most of the homebrew slowness. I like to roll the update/upgrade into a single, intentional call rather than rely on homebrews built-in logic.
I'm not sure whats taking so long then. My entire darwin-rebuild switch takes ~1s without the homebrew commands. If I manually run homebrew separately it takes ~4s the first time and ~1.5s in subsequent runs.
So you inspired me to take a look again, and it is indeed because I'm running `brew update` on my Nix-Darwin activations. It gets invoked in this script, which I call upon the advice of the KDE Mac tap maintainers: https://invent.kde.org/packaging/homebrew-kde/-/blob/master/...
The other problem is that each brew invocation is slow, and I have to invoke it twice before I can even call that script, due to some quirks of how my Homebrew prefix is set up.
Idk, maybe I'll just... not. I'm not currently actually using any KDE apps on Mac.
Extremely well, even supports passing arguments (`--HEAD`) through and integrates with services for casks too, so it can restart things like postgresql when homebrew updates it.
Having nix-darwin uninstall brews not declared in the flake makes me stay honest about keeping my configuration up to date as well, if I've just `brew install x` to try something it'll get removed next time I apply my config. Needs adding to the flake to keep it installed persistently, which in turn means my config tends to be up to date.