From d846865c9fd8c2624f6e1946dbfe77df34a9c1da Mon Sep 17 00:00:00 2001 From: imbytecat Date: Fri, 10 Apr 2026 22:06:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A3=B0=E6=98=8E=E5=BC=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20Homebrew=20casks/brews/masApps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 20 个 casks、11 个 brews、3 个 MAS 应用纳入 nix-darwin 管理 - onActivation.cleanup=zap 自动清理未声明的 brew 包 - 已在 nix 管理的 CLI 工具(biome, btop, fd 等)不再重复声明 - wget 移至 home-manager 实现跨平台可用 - 移除 zellij(已有 tmux) --- home/default.nix | 12 ++++---- modules/darwin/default.nix | 61 ++++++++++++++++++++++++++++++++++---- 2 files changed, 61 insertions(+), 12 deletions(-) diff --git a/home/default.nix b/home/default.nix index cc6d898..3656bcb 100644 --- a/home/default.nix +++ b/home/default.nix @@ -31,6 +31,7 @@ xh # curl/httpie jq # JSON yq # YAML + wget # System info fastfetch @@ -39,20 +40,17 @@ # File management trash-cli - # Terminal multiplexer (alternative) - zellij - # Nix tools - nix-output-monitor # nom — better nix build output + nix-output-monitor # nom nvd # nix version diff - nh # nix helper (nixos-rebuild wrapper) + nh # nix helper # AI coding agent opencode - comment-checker # AI code comment detection hook + comment-checker # Misc - micro # simple editor fallback + micro ]; # XDG directories diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix index e72c733..188666b 100644 --- a/modules/darwin/default.nix +++ b/modules/darwin/default.nix @@ -34,13 +34,64 @@ }; }; - # ── Homebrew (GUI apps not in nixpkgs) ───────────── + # ── Homebrew ─────────────────────────────────────── homebrew = { enable = true; - casks = [ - "raycast" - "arc" + + taps = [ + "antoniorodr/memo" + "steipete/tap" ]; - onActivation.cleanup = "zap"; + + # CLI tools not in nixpkgs or needing brew services + brews = [ + "ffmpeg" + "gitui" + "mas" + "memo" + "mole" + "ollama" + "pandoc" + "poppler" + "tailscale" + "steipete/tap/gogcli" + "steipete/tap/remindctl" + ]; + + # GUI apps + casks = [ + "1password" + "brave-browser" + "cc-switch" + "cherry-studio" + "dbeaver-community" + "discord" + "feishu" + "ghostty" + "keka" + "logitech-g-hub" + "mos" + "orbstack" + "qq" + "raycast" + "spotify" + "telegram-desktop" + "termius" + "visual-studio-code" + "wechat" + "winbox" + ]; + + # Mac App Store + masApps = { + "Microsoft Word" = 462054704; + "Windows App" = 1295203466; + "Xnip" = 1221250572; + }; + + onActivation = { + autoUpdate = true; + cleanup = "zap"; # remove anything not declared above + }; }; }