Cross-platform dotfiles managed with GNU Stow. One repo. Many machines. Zero friction.
- Overview
- Quick Start
- Structure
- Packages
- Hosts
- How It Works
- Pre-commit Hooks
- Adding a New Package
- License
Shared defaults live in common/. Host-specific overlays layer on top, so
each machine gets exactly the config it needs — no conditionals, no templating.
git clone https://github.com/FridrichMethod/dotfiles.git ~/dotfiles
cd ~/dotfiles
git submodule update --init --recursive
./stow-all.sh <host-dir> # e.g. mac, wsl-ubuntu, sherlock
.stowrcsets--target=~, so Stow links everything into your home directory.
dotfiles/
├── common/ shared defaults (stowed first)
│ ├── aria2/
│ ├── bash/
│ ├── conda/
│ ├── git/
│ ├── kitty/
│ ├── pymol/ submodule — auto-updated daily via GitHub Actions
│ ├── sh/
│ ├── ssh/
│ ├── tcsh/
│ ├── vim/
│ ├── wezterm/
│ ├── xonsh/
│ └── zsh/
│
├── mac/ macOS overrides
├── wsl-ubuntu/ WSL Ubuntu overrides
├── lab-ubuntu/ lab Ubuntu overrides
├── fedora/ Fedora overrides
├── ubuntu/ Ubuntu overrides
├── sherlock/ Stanford Sherlock HPC
├── marlowe/ host overrides
├── win/ Windows-side config (WezTerm, .wslconfig)
│
├── stow-all.sh one-command installer
├── dotfiles-update.sh
└── .stowrc Stow defaults (target = ~)
| Category | Tools |
|---|---|
| Shell | Zsh, Bash, POSIX sh, tcsh, xonsh |
| Terminal | Kitty, WezTerm |
| Editor | Vim |
| Version Control | Git, SSH |
| Science | Conda, PyMOL scripts |
| Utilities | Aria2 |
| Host | Platform | Layers |
|---|---|---|
mac |
macOS | bash, git, sh, ssh, zsh |
wsl-ubuntu |
WSL 2 | bash, git, sh, ssh, zsh |
lab-ubuntu |
Ubuntu (lab) | bash, git, sh, ssh, zsh |
fedora |
Fedora | bash, zsh |
ubuntu |
Ubuntu | bash, zsh |
sherlock |
Stanford HPC | bash, sh, zsh |
marlowe |
Custom host | bash, sh, zsh |
win |
Windows | wezterm, wsl |
common/zsh/.zshrc ──stow──▶ ~/.zshrc
mac/git/.gitconfig ──stow──▶ ~/.gitconfig (overrides common)
common/is stowed first — shared baseline for every machine.<host>/is stowed second — host-specific files override or extend common.- Stow runs with
--no-folding, so individual files are linked (not entire directories).
Optional but recommended — keeps configs clean before every commit:
pip install pre-commit # or: brew install pre-commit
pre-commit install
pre-commit run --all-files| Hook | Scope |
|---|---|
| shellcheck | .sh, .bash* |
| shfmt | .sh, .bash*, .zsh* |
| stylua | *.lua |
| built-in | whitespace, EOF, merge conflicts, YAML, JSON, TOML |
# 1. Create the package directory mirroring $HOME paths
mkdir -p common/newtool/.config/newtool
# 2. Add your config files
cp ~/.config/newtool/config.toml common/newtool/.config/newtool/
# 3. Stow it
stow --dir=common newtool