{ config, lib, pkgs, user, inputs, ... }: { options.custom.brew = with lib; { zen-browser = mkEnableOption "Enable Zen Browser"; webex = mkEnableOption "Enable Webe"; zoom = mkEnableOption "Enable Zoom"; slack = mkEnableOption "Enable Slack"; ghostty = mkEnableOption "Enable Ghostty"; ms-office = mkEnableOption "Enable MS Office"; ms-teams = mkEnableOption "Enable MS Teams"; spotify = mkEnableOption "Enable Spotify"; raycast = mkEnableOption "Enable Raycast"; whatsapp = mkEnableOption "Enable Whatsapp"; vscode = mkEnableOption "Enable VSCode"; vscode-insiders = mkEnableOption "Enable VSCode Insiders"; firefox = mkEnableOption "Enable Firefox"; google-chrome = mkEnableOption "Enable Google Chrome"; chromium = mkEnableOption "Enable Chromium"; aldente = mkEnableOption "Enable AlDente"; zotero = mkEnableOption "Enable Zotero"; amphetamine = mkEnableOption "Enable Amphetamine"; scroll-reverser = mkEnableOption "Enable Scroll Reverser"; ice = mkEnableOption "Enable Ice Menu Manager"; contexts = mkEnableOption "Enable Contexts"; forklift = mkEnableOption "Enable Forklift 4"; flux = mkEnableOption "Enable f.lux"; cleanshot = mkEnableOption "Enable cleanshot"; snippets-lab = mkEnableOption "Enable SnippetsLab"; iina = mkEnableOption "Enable IINA"; itsycal = mkEnableOption "Enable itsycal"; lookaway = mkEnableOption "Enable lookaway"; obsidian = mkEnableOption "Enable obsidian"; zed = mkEnableOption "Enable zed"; orion = mkEnableOption "Enable orion"; chatgpt = mkEnableOption "Enable ChatGPT"; antinote = mkEnableOption "Enable Antinote"; swish = mkEnableOption "Enable Swish"; rectangle = mkEnableOption "Enable Rectangle"; rectangle-pro = mkEnableOption "Enable Rectangle Pro"; emacs = mkEnableOption "Enable Emacs"; drawio = mkEnableOption "Enable draw.io"; parsify = mkEnableOption "Enable Parsify"; soulver = mkEnableOption "Enable Soulver"; pika = mkEnableOption "Enable Pika"; transmission = mkEnableOption "Enable Transmission"; alt-tab = mkEnableOption "Enable Alt-Tab"; r = mkEnableOption "Enable r"; rstudio = mkEnableOption "Enable rstudio"; sratoolkit = mkEnableOption "Enable sratoolkit"; hisat2 = mkEnableOption "Enable hisat2"; positron = mkEnableOption "Enable positron"; claude = mkEnableOption "Enable claude"; iterm2 = mkEnableOption "Enable iterm2"; cmake = mkEnableOption "Enable cmake"; ninja = mkEnableOption "Enable ninja"; clang-format = mkEnableOption "Enable clang-format"; marta = mkEnableOption "Enable marta"; valgrind = mkEnableOption "Enable valgrind"; }; config = lib.mkMerge [ { nix-homebrew = { inherit user; enable = true; enableRosetta = true; taps = lib.mkMerge [ { "homebrew/homebrew-core" = inputs.homebrew-core; "homebrew/homebrew-cask" = inputs.homebrew-cask; "homebrew/homebrew-createzap" = inputs.homebrew-createzap; "d12frosted/homebrew-emacs-plus" = inputs.homebrew-emacs-plus; "brewsci/homebrew-bio" = inputs.homebrew-brewsci-bio; # "LouisBrunner/valgrind" = inputs.homebrew-valgrind; } ]; mutableTaps = false; # true to enable valgrind }; homebrew = { enable = true; onActivation = { autoUpdate = true; upgrade = true; cleanup = "zap"; }; global = { brewfile = true; }; }; } # mas apps (lib.mkIf config.custom.brew.amphetamine { homebrew.masApps = { "Amphetamine" = 937984704; }; }) (lib.mkIf config.custom.brew.snippets-lab { homebrew.masApps = { "SnippetsLab" = 1006087419; }; }) # casks (lib.mkIf config.custom.brew.zen-browser { homebrew.casks = [ "zen-browser" ]; }) (lib.mkIf config.custom.brew.webex { homebrew.casks = [ "webex" ]; }) (lib.mkIf config.custom.brew.slack { homebrew.casks = [ "slack" ]; }) (lib.mkIf config.custom.brew.zoom { homebrew.casks = [ "zoom" ]; }) (lib.mkIf config.custom.brew.spotify { homebrew.casks = [ "spotify" ]; }) (lib.mkIf config.custom.brew.ghostty { homebrew.casks = [ "ghostty" ]; }) (lib.mkIf config.custom.brew.ms-office { homebrew.casks = [ "microsoft-office" ]; }) (lib.mkIf config.custom.brew.ms-teams { homebrew.casks = [ "microsoft-teams" ]; }) (lib.mkIf config.custom.brew.raycast { homebrew.casks = [ "raycast" ]; }) (lib.mkIf config.custom.brew.whatsapp { homebrew.casks = [ "whatsapp" ]; }) (lib.mkIf config.custom.brew.vscode { homebrew.casks = [ "visual-studio-code" ]; }) (lib.mkIf config.custom.brew.vscode-insiders { homebrew.casks = [ "visual-studio-code@insiders" ]; }) (lib.mkIf config.custom.brew.firefox { homebrew.casks = [ "firefox" ]; }) (lib.mkIf config.custom.brew.google-chrome { homebrew.casks = [ "google-chrome" ]; }) (lib.mkIf config.custom.brew.chromium { homebrew.casks = [ "chromium" ]; }) (lib.mkIf config.custom.brew.aldente { homebrew.casks = [ "aldente" ]; }) (lib.mkIf config.custom.brew.zotero { homebrew.casks = [ "zotero" ]; }) (lib.mkIf config.custom.brew.scroll-reverser { homebrew.casks = [ "scroll-reverser" ]; }) (lib.mkIf config.custom.brew.ice { homebrew.casks = [ "jordanbaird-ice" ]; }) (lib.mkIf config.custom.brew.contexts { homebrew.casks = [ "contexts" ]; }) (lib.mkIf config.custom.brew.forklift { homebrew.casks = [ "forklift" ]; }) (lib.mkIf config.custom.brew.flux { homebrew.casks = [ "flux" ]; }) (lib.mkIf config.custom.brew.cleanshot { homebrew.casks = [ "cleanshot" ]; }) (lib.mkIf config.custom.brew.iina { homebrew.casks = [ "iina" ]; }) (lib.mkIf config.custom.brew.itsycal { homebrew.casks = [ "itsycal" ]; }) (lib.mkIf config.custom.brew.lookaway { homebrew.casks = [ "lookaway" ]; }) (lib.mkIf config.custom.brew.obsidian { homebrew.casks = [ "obsidian" ]; }) (lib.mkIf config.custom.brew.zed { homebrew.casks = [ "zed" ]; }) (lib.mkIf config.custom.brew.orion { homebrew.casks = [ "orion" ]; }) (lib.mkIf config.custom.brew.chatgpt { homebrew.casks = [ "chatgpt" ]; }) (lib.mkIf config.custom.brew.antinote { homebrew.casks = [ "antinote" ]; }) (lib.mkIf config.custom.brew.swish { homebrew.casks = [ "swish" ]; }) (lib.mkIf config.custom.brew.rectangle { homebrew.casks = [ "rectangle" ]; }) (lib.mkIf config.custom.brew.rectangle-pro { homebrew.casks = [ "rectangle-pro" ]; }) (lib.mkIf config.custom.brew.emacs { homebrew.brews = [ "emacs-plus" ]; }) (lib.mkIf config.custom.brew.drawio { homebrew.casks = [ "drawio" ]; }) (lib.mkIf config.custom.brew.parsify { homebrew.casks = [ "parsify" ]; }) (lib.mkIf config.custom.brew.soulver { homebrew.casks = [ "soulver" ]; }) (lib.mkIf config.custom.brew.pika { homebrew.casks = [ "pika" ]; }) (lib.mkIf config.custom.brew.transmission { homebrew.casks = [ "transmission" ]; }) (lib.mkIf config.custom.brew.alt-tab { homebrew.casks = [ "alt-tab" ]; }) (lib.mkIf config.custom.brew.r { homebrew.brews = [ "r" ]; }) (lib.mkIf config.custom.brew.rstudio { homebrew.casks = [ "rstudio" ]; }) (lib.mkIf config.custom.brew.r { homebrew.brews = [ "sratoolkit" ]; }) (lib.mkIf config.custom.brew.hisat2 { homebrew.brews = [ "hisat2" ]; }) (lib.mkIf config.custom.brew.positron { homebrew.casks = [ "positron" ]; }) (lib.mkIf config.custom.brew.claude { homebrew.casks = [ "claude" ]; }) (lib.mkIf config.custom.brew.iterm2 { homebrew.casks = [ "iterm2" ]; }) (lib.mkIf config.custom.brew.cmake { homebrew.brews = [ "cmake" ]; }) (lib.mkIf config.custom.brew.ninja { homebrew.brews = [ "ninja" ]; }) (lib.mkIf config.custom.brew.clang-format { homebrew.brews = [ "clang-format" ]; }) (lib.mkIf config.custom.brew.marta { homebrew.casks = [ "marta" ]; }) (lib.mkIf config.custom.brew.valgrind { # homebrew.brews = [ # { # name = "LouisBrunner/valgrind/valgrind"; # args = ["HEAD"]; # } # ]; }) ]; }