This repository contains my personal dotfiles managed with chezmoi.
The goal is a clean, portable, reproducible setup across macOS, Linux, and GitHub Codespaces.
The repository is designed to support three installation modes:
- GitHub Codespaces (automatic)
- Personal machines (full setup)
- Temporary or shared machines (lite setup)
If this repository is selected as your dotfiles repository in GitHub Codespaces settings and
“Automatically install dotfiles” is enabled, setup runs automatically.
No manual steps are required.
This relies on GitHub’s official dotfiles mechanism and does not require install.sh to be invoked manually.
Use this on a personal macOS or Linux machine where you want the full environment: shell configuration, tools, 1Password integration, SSH agent wiring, and VS Code setup.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/mkhnsn/dotfiles/main/install.sh)"Notes:
- macOS requires Homebrew to already be installed
- You’ll be prompted to sign into 1Password (once)
- This is the recommended path for long‑lived personal machines
Use this on machines you don’t own long‑term (servers, borrowed laptops, CI runners).
sh -c "$(curl -fsLS get.chezmoi.io)" -- init --apply mkhnsn/dotfiles.gitThis installs chezmoi and applies dotfiles without interactive secret setup.
Once installed, update configuration at any time with:
chezmoi applyTo force-refresh external dependencies (plugins, git repos):
chezmoi apply -Rdot_*/— canonical configuration templates managed by chezmoi.chezmoiexternal.toml— external git‑based dependencies (zsh plugins, etc.)install.sh— full bootstrap for personal machinesbootstrap/— helper scripts for containers or special environmentsprivate_*.tmpl— secret-backed or machine-specific templates
This structure keeps base configuration portable while allowing platform-specific behavior.
VS Code configuration is generated from canonical templates and applied to the correct OS-specific paths.
- Base templates live under
.chezmoitemplates/vscode/ - macOS and Linux wrappers map these templates to the appropriate VS Code directories
This allows a single source of truth while remaining OS‑correct.
If zsh completions become stale or corrupted:
rm -f "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/zcompdump"* 2>/dev/null || true
exec zshThis clears the completion cache and forces regeneration.
- SSH authentication uses the 1Password SSH agent on supported platforms
- Git commit signing is configured using SSH keys
- Allowed signers are managed explicitly to avoid key overload
No private keys are stored in this repository.
1Password is used for:
- Secure secret retrieval via
op://references - SSH agent integration on interactive machines
For non‑interactive environments (e.g. CI or Codespaces), secrets are optional and not required for a successful apply.
Devcontainers and GitHub Codespaces rely on:
- GitHub’s native dotfiles integration
- Automatic invocation of supported bootstrap files (
install.sh,bootstrap.sh, etc.)
No duplicate initialization logic is required.
For detailed behavior, consult the chezmoi documentation or inspect install.sh.