Organize Dotfiles Per-App with GNU Stow
Most dotfiles tutorials use a flat structure where the repo mirrors $HOME directly. There’s another approach — organizing configs by app — that makes it easy to selectively install only what you need on a given machine.
Flat structure (common)
Section titled “Flat structure (common)”dotfiles/├── .zshrc└── .config/ ├── ghostty/ └── zed/Running stow . symlinks everything at once, but you can’t easily install just one app’s config.
Per-app structure (stow packages)
Section titled “Per-app structure (stow packages)”dotfiles/├── zsh/│ └── .zshrc├── ghostty/│ └── .config/│ └── ghostty/│ └── config└── zed/ └── .config/ └── zed/ └── settings.jsonEach app gets its own top-level folder that mirrors $HOME. Stow creates symlinks in the parent directory matching the internal structure.
Symlink everything:
stow */Or install just one app — useful when setting up a server that doesn’t need a GUI config:
stow ghostty