Skip to content

Repository files navigation

dotfiles

About

Personal Apple Silicon Mac setup with nix-darwin and home-manager. One repo, one bootstrap, same machine every time.

Stack: system defaults + Homebrew (via nix-homebrew), daily CLIs via Nix, project runtimes via mise, zsh/starship, Neovim + WezTerm (rose-pine moon), Finder open-in-Code/WezTerm services, and agent configs (Codex, opencode, Grok, Claude Code, Kimi Code, Oh My Pi, optional Pi).

Setup

git clone git@github.com:leihuang23/dotfiles.git
cd dotfiles
./bootstrap.sh   # Nix → ~/.dotfiles link → username check → first switch

After that, apply changes with:

./rebuild.sh

Defaults in this tree: user leihuang, host macbook-pro, aarch64-darwin. Change those (and git name/email in home.nix) before bootstrap on another machine. Host label must match in flake.nix, rebuild.sh, and bootstrap.sh.

Homebrew: homebrew.onActivation.cleanup = "zap" removes undeclared brews/casks on every switch. Read configuration.nix first.

Layout

Path Role
flake.nix Entry: nixpkgs, nix-darwin, home-manager, nix-homebrew
configuration.nix System + Homebrew
home.nix User packages, shell, git, symlinks
home/ Live configs (nvim, wezterm, agents, mise, skills, …)
bootstrap.sh / rebuild.sh First switch / daily re-apply

home.nix uses out-of-store symlinks, so edits under home/ are live; run ./rebuild.sh only for package lists and system settings.

Hybrid: Nix owns always-on machine tools; mise owns per-project runtimes. Do not install the same CLI in both. Global mise config: home/.config/mise/config.toml.

Notes

  • Claude Code: Homebrew cask; provider/env owned by CC Switch (do not fully manage ~/.claude/settings.json).
  • Docker Desktop: use install-docker-desktop (not a brew cask here).
  • High-agency aliases: cocodex --full-auto, ccclaude --dangerously-skip-permissions.
  • Optional Pi resources under home/.pi/agent/; runtime state stays local.

License

MIT No Attribution. See LICENSE.


Inspired by kunchenguid's work.

About

Personal nix-darwin + home-manager Mac setup (mise, WezTerm, Neovim, agents)

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages