/ darwinModules / homebrew.nix
homebrew.nix
 1  {
 2    config,
 3    lib,
 4    pkgs,
 5    ...
 6  }:
 7  {
 8    homebrew.enable = true;
 9    system.activationScripts.homebrew.text = lib.mkIf config.homebrew.enable (
10      lib.mkBefore ''
11        if [[ ! -f "${config.homebrew.brewPrefix}/brew" ]]; then
12          /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
13        fi
14      ''
15    );
16  
17    homebrew.caskArgs.no_quarantine = true;
18    homebrew.onActivation.cleanup = "uninstall";
19    homebrew.onActivation.upgrade = true;
20    homebrew.brews = [ "mas" ];
21  
22    homebrew.casks = [
23      # keep-sorted start
24      "aldente"
25      "alt-tab"
26      "bitwarden"
27      "claude"
28      "cleanshot"
29      "devonthink"
30      "hancom-word"
31      "hazel"
32      "hookmark"
33      "logi-options+"
34      "microsoft-excel"
35      "microsoft-powerpoint"
36      "microsoft-word"
37      "nextcloud"
38      "onedrive"
39      "raycast"
40      "secretive"
41      "slack"
42      "zen"
43      "zerotier-one"
44      "zoom"
45      "zotero"
46      # keep-sorted end
47    ];
48  
49    # App Store apps (requires `mas` CLI and App Store login)
50    homebrew.masApps = {
51      "Goodnotes" = 1444383602;
52      "KakaoTalk" = 869223134;
53      "Perplexity" = 6714467650;
54      "WireGuard" = 1451685025;
55      "Xcode" = 497799835;
56    };
57  
58    # Secretive SSH agent
59    environment.etc."ssh/ssh_config.d/secretive.conf".text = ''
60      Host *
61        IdentityAgent ~/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh
62    '';
63  
64    # Ghostty terminal requires Nerd Fonts
65    fonts.packages = [ pkgs.nerd-fonts.fira-code ];
66  }