This repository keeps two separate responsibilities:
- Chezmoi is the source of truth for user-facing dotfiles, templates, secrets, and platform-specific file placement.
- Ansible provisions packages, binaries, source builds, services, and system-level configuration.
The main guardrail is simple: Ansible must not patch files that are managed by Chezmoi in the home directory. If a shell, editor, prompt, or PowerShell behavior needs to change, edit the Chezmoi source file or template instead.
dot_*files map to POSIX dotfiles such as~/.bashrc,~/.profile, and~/.zshrc.dot_config/holds XDG-style config content for Linux and cross-platform tools.AppData/holds Windows-specific sources.dot_local/holds user-local binaries and bundled assets.private_*holds private managed content.readonly_*is currently preserved as a managed reference surface and is not cleaned up automatically. Today that includes PowerShell and icon-related Windows-facing paths that are kept for compatibility and reference rather than as the canonical Linux source of truth..chezmoitemplates/contains canonical shared templates that delegate paths reuse.
dot_config/nvim/init.lua.tmplandAppData/Local/nvim/init.lua.tmplboth delegate to.chezmoitemplates/nvim/init.lua.dot_config/powershell/Microsoft.PowerShell_profile.ps1.tmplandreadonly_Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmplboth delegate to.chezmoitemplates/pwsh/Microsoft.PowerShell_profile.ps1.- Small, path-specific templates can stay inline. Shared large configs should continue to be centralized under
.chezmoitemplates/.
dot_profilesourcesdot_bashrcfor bash login shells and otherwise sourcesdot_config/shell_common.dot_bashrcsourcesdot_config/shell_common.dot_zshrcsourcesdot_config/shell_common, thendot_config/zsh_aliases, thendot_config/windows_aliases.dot_config/zsh_aliasesalso sourcesdot_config/windows_aliasestoday, so there is duplicate sourcing. That should be documented and resolved deliberately in a later change, not implicitly.dot_zshrccurrently runschezmoi updateandchezmoi applyautomatically when~/.local/chezmoiexists. That behavior is preserved until explicitly changed.
.chezmoiignore currently drives platform-aware rendering using Chezmoi built-ins:
.chezmoi.osdistinguishes Linux from Windows..chezmoi.kernel.osreleaseis used to detect WSL by checking formicrosoft..chezmoi.osRelease.idis used to gate Debian and Ubuntu-specific scripts.
The current assumption is:
- Windows-specific sources live under
AppData/and Windows-facing readonly paths. - Linux user config lives under
dot_*,dot_config/, anddot_local/. - WSL-specific helper symlinks under
dot_local/bin/only apply on Linux when the kernel release indicates WSL.
The files under dot_local/bin/ named symlink_gpg, symlink_ssh, symlink_ssh-add, and symlink_scp are deliberate Windows-interop shims for WSL environments.
symlink_gpgtargets/mnt/c/Program Files/GnuPG/bin/gpg.exe.symlink_ssh,symlink_ssh-add, andsymlink_scptarget the Windows OpenSSH binaries under/mnt/c/Windows/System32/OpenSSH/.
These are preserved because they provide Windows credential and agent interop from Linux shells. Any future cleanup should first confirm that Windows OpenSSH and GnuPG bridging is no longer needed.
The current playbook in scripts/ansible/playbook.yml runs in this order:
- Debugging facts.
- Shared preflight checks for supported OS family, package manager, required commands, and disk space.
- System update and recovery block with
become: true. - System roles with
become: true. - User roles without
become. - A best-effort LazyVim sync.
- Final user cleanup roles.
System roles:
packagesbatfzfgeerlingguy.goghneovimoh-my-poshpwshtmuxzshwslpodman
User roles:
rootless-networkingnvmbunhurricanehrndz.rustupcargouvspeckitdotnetcopilot-cliantigravity-clicontainer-cleanup
The repository currently relies on these Galaxy roles and collections:
- Role
geerlingguy.go - Role
hurricanehrndz.rustup - Collection
ansible.posix - Collection
community.general
The lowest-cost checks already available in the repository are:
chezmoi diffchezmoi doctor- the Docker dry run at
.vscode/test-dotfiles.sh - the Docker Ansible idempotence run at
.vscode/test-ansible-idempotence.sh cd scripts/ansible && ansible-galaxy install -r requirements.yml && ansible-playbook playbook.yml --syntax-checkansible-lint playbook.ymlwith the repository baseline in.ansible-lint.yml- repo
yamllint - shell linting for the shared shell files and helper scripts
These checks should be run after architecture or provisioning changes before broader refactors are attempted.
These areas are preserved as-is until explicitly confirmed:
- Whether
readonly_Documents/andreadonly_Pictures/are intentional long-term reference paths or eventual cleanup targets. - Whether
dot_zshrcshould keep automatically runningchezmoi updateandchezmoi apply. - Whether the WSL helper shims under
dot_local/bin/should remain the preferred Windows OpenSSH and GnuPG bridge. - Whether
dot_config/windows_aliases.tmplshould keep hard-coded Windows user path probes or move to a data-driven candidate list.
Use this before making follow-up changes:
- Edit Chezmoi source files for dotfile behavior.
- Edit Ansible roles, defaults, vars, or playbook data for provisioning behavior.
- Do not use Ansible to mutate files that Chezmoi manages.
- Prefer shared templates in
.chezmoitemplates/when the same config is rendered to multiple destinations. - Run the narrowest relevant validation command after each change.
- Do not create unsigned commits.