4 ms·
It's worth noting you can let Nix manage Homebrew for you, too. I do this on my MBP on which I have nix-darwin running, not for regular Homebrew formulae but fo
by paulsmith 3y ago
It's worth noting you can let Nix manage Homebrew for you, too. I do this on my MBP on which I have nix-darwin running, not for regular Homebrew formulae but for casks for GUI apps.
In my configuration, I have this
homebrew = {
enable = true;
onActivation = {
autoUpdate = true;
upgrade = true;
};
casks = [ "inkscape" <other gui apps ...> ];
};
- JamesSwift 3y agoI achieve mostly the same on a non nix-darwin setup using vanilla home-manager: home.file."Brewfile" = { onChange = '' HOMEBREW_NO_AUTO_UPDATE=1 /usr/local/bin/brew bundle --file="$HOME/Brewfile" --cleanup --no-upgrade ''; text = '' cask '1password' ... ''; }
- Cu3PO42 3y agoExcellent point, thank you! I use that as well and intended to mention it and then I just forgot. Personally, I've been hesitant to turn on autoUpdate, have you found it to work well?
- boots22 3y agoYep, and we now have nix-homebrew, which installs homebrew for you as a flake input. Taps are also flake inputs so your apps versions get declaratively managed/locked too! Here’s how I do it: https://github.com/dustinlyons/nixos-config/blob/main/flake.nix https://github.com/dustinlyons/nixos-config/blob/main/flake....