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.
https://github.com/LnL7/nix-darwin/blob/230a197063de9287128e...
and
https://github.com/LnL7/nix-darwin/blob/230a197063de9287128e...
By default, brew commands run manually do still perform the automatic updates, though. That can be disabled with the following Nix-Darwin option: https://daiderd.com/nix-darwin/manual/#opt-homebrew.global.a...