スキル一覧に戻る
odysseus0

nix-config

by odysseus0

My declarative macOS development environment managed with nix-darwin and home-manager

0🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: nix-config description: "Declarative macOS config via Nix (packages, apps, dotfiles, system settings). Use when: (1) Permission denied or root-owned on config/dotfiles (indicates Nix-managed), (2) Adding packages or apps, (3) Configuring programs, (4) Rebuilding system (make switch)."

Nix Config

Declarative macOS environment at ~/nix-config. See the repo's CLAUDE.md for full architecture.

Adding Packages

CLI toolsusers/tengjizhang/home/packages.nix

home.packages = with pkgs; [
  ripgrep
  jq
  # ...
];

GUI appsusers/tengjizhang/darwin.nix

homebrew.casks = [ "raycast" "obsidian" ];

Third-party taps → Use full tap/cask path:

homebrew.casks = [ "steipete/tap/codexbar" ];

Mac App Storeusers/tengjizhang/darwin.nix

homebrew.masApps = { "Things" = 904280696; };

npm Package Pattern

For latest npm packages, use pnpm dlx wrapper:

(writeShellScriptBin "toolname" ''
  exec ${pnpm}/bin/pnpm dlx @scope/package@latest "$@"
'')

Examples in packages.nix: claude, codex, gemini, gccli

Rebuild

cd ~/nix-config && make switch > /tmp/nix-switch.log 2>&1 && echo "✓ Switch succeeded" || echo "✗ Switch failed (see /tmp/nix-switch.log)"

Workflow

  1. Edit the appropriate .nix file
  2. Commit changes (keeps git clean before rebuild)
  3. make switch to rebuild and activate
  4. Push changes

Key Files

  • flake.nix - Inputs/outputs, system definition
  • users/tengjizhang/home/packages.nix - CLI packages
  • users/tengjizhang/home/programs.nix - Program configs (git, neovim, etc.)
  • users/tengjizhang/darwin.nix - Homebrew, macOS settings

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です