Personal macOS and shell setup managed with
chezmoi and Nix flakes
(nix-darwin + home-manager).
chezmoi/: templated dotfiles for shell and tool config (zsh, git, helix, wezterm, bat, etc.)modules/darwin/: host-level macOS settings (nix-darwin), Homebrew integration, system defaultsmodules/home/: user-level packages and CLI/tooling (home-manager)modules/flake-parts/: flake composition, dev shell, format/lint and pre-commit hooksscripts/: convenience maintenance scripts (update-all.sh,cleanup-all.sh)
- macOS
- Nix with flakes enabled
gitghauthenticated (gh auth login) for update flows that need a GitHub token
Run:
./install.shThis script installs chezmoi if missing, then initializes
and applies this repo as the source.
# Remote source
sudo nix run github:LnL7/nix-darwin -- switch --flake github:yxtay/dotfiles#Mac
# Local checkout
sudo nix run github:LnL7/nix-darwin -- switch --flake .#Macnix run home-manager -- switch --flake .#yuxuantay# Enter dev shell
nix develop
# Format/lint via flake formatter
nix fmt
# Run configured pre-commit hooks
nix develop -c pre-commit run --all-files# Rebuild + refresh dotfiles + upgrade uv tools
./scripts/update-all.sh
# Clean caches and old artifacts
./scripts/cleanup-all.shNotes:
update-all.shrequiresgh auth tokenand usessudofornix-darwin switch.cleanup-all.shaggressively prunes caches (Nix, Docker/Podman/npm/uv, and user cache dirs).
Current flake defaults are:
- Host:
Mac - User:
yuxuantay
These are defined in flake.nix.
MIT