#+title: Homebrew Configuration

Set up Homebrew. I disable the quarantine automatically and ensure that the state of Homebrew is exactly as specified here.
#+begin_src nix
  { config, pkgs, ... }:

  {
    homebrew = {
      enable = true;

      caskArgs.no_quarantine = true;

      global.autoUpdate = false;
      onActivation = {
        autoUpdate = true;
        cleanup = "zap";
        upgrade = true;
      };

      taps = [
        "d12frosted/emacs-plus"
        "homebrew/bundle"
        "homebrew/cask-fonts"
        "homebrew/cask-versions"
        "homebrew/services"
        "jorgelbg/tap"
      ];

      brews = [
        # emacs is handled better by homebrew on mac
        {
          name = "emacs-plus@30";
          args = [
            "with-native-comp"
            "with-imagemagick"
            "with-xwidgets"
            "with-mailutils"
            "with-ctags"
            "with-retro-emacs-logo-icon"
          ];
        }

        # problematic nix builds
        "choose-gui" # nix version fails to build
        "clang-format" # nix version screws up clang setup
        "openjdk" # there's really no jdk for mac from nix?
        "pinentry-touchid" # no nix version

        # needed for pdf-tools for emacs
        "autoconf"
        "automake"
        "pkg-config"
        "poppler"

        # required by emacs-plus@30
        "gcc"
        "imagemagick"
        "jansson"
        "jpeg"
        "libgccjit"
        "librsvg"
        "zlib"

        "mailutils"
        "tree-sitter"

        # required by pinentry-touchid
        "libassuan@2"
        "gnupg"
        "pinentry-mac"
      ];

      # homebrew handles graphical applications better than nix
      casks = [
        "audacity"
        "blender"
        "cabal"
        "calibre"
        "desmume"
        "discord"
        "dwarf-fortress-lmp"
        "firefox"
        "gcc-arm-embedded"
        "ghostty"
        "gimp"
        "godot"
        "gzdoom"
        "inkscape"
        "krita"
        "librewolf"
        "multimc"
        "obs"
        "openemu"
        "openmw"
        "pokemon-showdown"
        "proton-drive"
        "proton-mail-bridge"
        "protonvpn"
        "qbittorrent"
        "rar"
        "syncthing"
        "thunderbird"
        "tor-browser"
        "vlc"
        "whisky"
        "zotero"
       ];
    };
  }
#+end_src
