Dotfiles
A link folder is a directory in your profile that dotkit symlinks into a destination directory, mirroring the folder structure. Use it for dotfiles!
Add link.env to any folder to make it a link folder:
DEST=~DEST can be absolute, ~/path, or relative to link.env.
Place your dotfiles in the folder:
Directoryprofiles/personal/dotfiles/ - link.env - .zshrc - .gitignore_global - .config/ - nvim/ - init.lua
- …
When dotkit apply runs, every file is symlinked to the corresponding path under DEST:
.zshrc → ~/.zshrc.gitignore_global → ~/.gitignore_global.config/nvim/init.lua → ~/.config/nvim/init.luaParent directories are created automatically.
Behavior
Section titled “Behavior”For each file, dotkit checks what’s already at the destination:
| Destination state | Action |
|---|---|
| Missing | Symlink created |
| Already correct symlink | Reported ok, skipped |
| Symlink to elsewhere | Backed up with timestamp, replaced |
| Real file | Backed up with timestamp, replaced |
Backups use the pattern filename.bak.YYYYMMDDHHMMSS. If a real file is backed up, dotkit also shows a diff so you can review what changed.
Running manually
Section titled “Running manually”Re-apply symlinks at any time:
dotkit link dotfilesModule path is relative to the active profile directory. Already-correct symlinks are reported ok and skipped. This is safe to run repeatedly.
Or point directly at the folder:
dotkit link ~/dotkit/profiles/personal/dotfilesdotkit link ~/dotkit/profiles/personal/dotfiles ~Excluded files
Section titled “Excluded files”link.env, todo.env, and run.env are never symlinked. They’re considered marker files, not dotfiles.
Nested dotfiles
Section titled “Nested dotfiles”The folder structure mirrors exactly. A file at dotfiles/.config/nvim/init.lua symlinks to ~/.config/nvim/init.lua. Any missing parent directories (~/.config/nvim/) are created.