News for hackers. Stuff that matters.
Re:Nix Survival Mode: macOS upgrades won't break Nix anymore by paulsmith on Wednesday October 25, 2023 @02:20PM (#38016275)
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 ...> ];
  };
Re:Nix Survival Mode: macOS upgrades won't break Nix anymore by JamesSwift on Wednesday October 25, 2023 @02:24PM (#38016327)
I 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'
      ...
    '';
  }
Re:Nix Survival Mode: macOS upgrades won't break Nix anymore by Cu3PO42 on Wednesday October 25, 2023 @02:24PM (#38016333)
Excellent 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?
Re:Nix Survival Mode: macOS upgrades won't break Nix anymore by boots22 on Wednesday October 25, 2023 @02:50PM (#38016720)
Yep, 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....