Skip to content

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:

profiles/personal/dotfiles/link.env
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.lua

Parent directories are created automatically.

For each file, dotkit checks what’s already at the destination:

Destination stateAction
MissingSymlink created
Already correct symlinkReported ok, skipped
Symlink to elsewhereBacked up with timestamp, replaced
Real fileBacked 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.

Re-apply symlinks at any time:

Terminal window
dotkit link dotfiles

Module 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:

Terminal window
dotkit link ~/dotkit/profiles/personal/dotfiles
dotkit link ~/dotkit/profiles/personal/dotfiles ~

link.env, todo.env, and run.env are never symlinked. They’re considered marker files, not 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.