Skip to content

yxtay/dotfiles

Repository files navigation

dotfiles

Personal macOS and shell setup managed with chezmoi and Nix flakes (nix-darwin + home-manager).

What's in this repo

  • 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 defaults
  • modules/home/: user-level packages and CLI/tooling (home-manager)
  • modules/flake-parts/: flake composition, dev shell, format/lint and pre-commit hooks
  • scripts/: convenience maintenance scripts (update-all.sh, cleanup-all.sh)

Prerequisites

  • macOS
  • Nix with flakes enabled
  • git
  • gh authenticated (gh auth login) for update flows that need a GitHub token

Bootstrap with chezmoi

Run:

./install.sh

This script installs chezmoi if missing, then initializes and applies this repo as the source.

Apply system config (nix-darwin)

# 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 .#Mac

Apply user config (home-manager standalone)

nix run home-manager -- switch --flake .#yuxuantay

Development workflow

# 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

Maintenance scripts

# Rebuild + refresh dotfiles + upgrade uv tools
./scripts/update-all.sh

# Clean caches and old artifacts
./scripts/cleanup-all.sh

Notes:

  • update-all.sh requires gh auth token and uses sudo for nix-darwin switch.
  • cleanup-all.sh aggressively prunes caches (Nix, Docker/Podman/npm/uv, and user cache dirs).

Host/User defaults

Current flake defaults are:

  • Host: Mac
  • User: yuxuantay

These are defined in flake.nix.

License

MIT

Releases

No releases published

Packages

 
 
 

Contributors