Peinan's collection of configuration files for setting up a development environment.
- Shell: Zsh (
.zshrc,.zshenv,.alias) - Git: Git configuration (
.gitconfig) and delta for beautiful diffs - Editors: Neovim (submodule)
- Terminal: Ghostty
- Multiplexing: tmux (submodule)
- Package Management: Homebrew (
Brewfile) - Font: SF Mono Square
Caution
This dotfiles is designed for macOS.
# The easiest way
curl -fsSL https://dotfiles.peinan.cc/install | bash
# or
wget -qO- https://dotfiles.peinan.cc/install | bash
# or via GitHub
curl -fsSL https://raw.githubusercontent.com/peinan/dotfiles/HEAD/scripts/install.sh | bash
# or you can install stow and setup step-by-step by yourself
brew install stow
git clone --recursive https://github.com/peinan/dotfiles && cd dotfiles
brew bundle install
stow -v -t ~ srcThis repository uses GNU Stow to manage symlinks.
All configuration files are located in the src/ directory, which mirrors the structure of the home directory.
We use an "All-in-One" package strategy. The src/ directory is treated as a single package that maps directly to $HOME.
dotfiles/
├── src/ <-- Maps to $HOME
│ ├── .zshrc <-- Links to ~/.zshrc
│ ├── .gitconfig <-- Links to ~/.gitconfig
│ └── .config/ <-- Links to ~/.config/
│ ├── nvim/ <-- Links to ~/.config/nvim (Directory link)
│ └── gh/ <-- Links to ~/.config/gh
├── scripts/ <-- Setup scripts (Not stowed)
└── Brewfile <-- Homebrew bundle (Not stowed)
- Move the file from your home directory to the
srcdirectory (maintaining the structure). - Run
stowagain to create the link.
# Example: Adding .tmux.conf
mv ~/.tmux.conf src/
stow -v -t ~ srcSince they are symlinked, you can edit the files in your home directory directly. The changes will be reflected in the repository.
vim ~/.zshrc
# Changes are automatically applied to src/.zshrcDirectories that are Git submodules (like src/.config/nvim) are linked as a single directory symlink.
For this to work cleanly, ensure the target directory (e.g., ~/.config/nvim) does not exist before running stow.
Files listed in src/.stow-local-ignore are excluded from symlinking.
(e.g., Brewfile, README.md, .DS_Store)
To verify which files are managed by stow:
ls -la ~ | grep "dotfiles/src"
# Output example:
# .zshrc -> .../dotfiles/src/.zshrcFor detailed installation instructions, see the documentation site.
This repository is licensed under the MIT License - see the LICENSE file for details.