Skip to content
dots
Esc
↑↓navigate↵open⌘Jpreview
On this page

Installation

Install chezmoi and apply these dotfiles with one command, or pass your own chezmoi arguments.

One-liner

curl -fsSL https://dots.prd.lk/install | sh

/install is chezmoi’s official install script (get.chezmoi.io/lb), vendored into this site’s public/ directory with three changes:

  1. chezmoi installs to $HOME/.local/bin, whatever directory you run it from.
  2. With no arguments, it runs chezmoi init --apply prdlk/dotfiles after installing.
  3. When the script is piped into sh, chezmoi’s stdin is reattached to /dev/tty so the first-run prompts still work.

The script checks the release tarball’s SHA-256 before installing, as upstream does.

Before you run it

Package manager

Arch: sudo for pacman. paru is needed for AUR packages (topgrade, and noctalia-shell on desktop roles); without it the package script prints a warning and skips them. macOS: Homebrew is required; the package script exits with an error if brew is missing.

GitHub access

prdlk/dotfiles is a private repository, so the clone needs credentials:

  • HTTPS (default): git prompts for your GitHub username and a personal access token with repo scope.
  • SSH: add the machine’s key to GitHub first, then use the --ssh form below.

age key

chezmoi is configured for age encryption with the identity at ~/.config/chezmoi/key.txt. The key is never committed. Copy it from an existing machine before applying:

mkdir -p ~/.config/chezmoi
scp <existing-machine>:.config/chezmoi/key.txt ~/.config/chezmoi/key.txt
chmod 600 ~/.config/chezmoi/key.txt

Options

Arguments after -- go to chezmoi and replace the default init --apply prdlk/dotfiles:

sh -c "$(curl -fsSL https://dots.prd.lk/install)" -- init --apply --ssh prdlk/dotfiles
sh -c "$(curl -fsSL https://dots.prd.lk/install)" -- init prdlk/dotfiles
chezmoi diff
chezmoi apply
sh -c "$(curl -fsSL https://dots.prd.lk/install)" -- --version
Flag / variable Effect
-b <dir> Install directory (default $HOME/.local/bin)
-t <tag> chezmoi release tag (default latest)
-d Debug logging
BINDIR Same as -b
DOTFILES_REPO Repo for the default init --apply (default prdlk/dotfiles)

First apply

Prompts

.chezmoi.toml.tmpl asks once for name, email, and role (desktop, laptop, mac, server). Answers are stored in ~/.config/chezmoi/chezmoi.toml and not asked again. See Configuration.

Packages

run_onchange_before_10-packages installs everything in .chezmoidata/packages.yaml with pacman/paru or Homebrew before any file is written. See Scripts.

Files and externals

Configs are linked into $HOME (symlink mode). The neovim config and a bat syntax are cloned as externals. See Externals and ignore rules.

Post-apply scripts

gh extensions, tpm, the bat cache, the font cache, yazi plugins, and the niri user service on Linux.

Updating

chezmoi update   # git pull + apply
chezmoi diff     # what apply would change

Refreshing the install script

public/install is a vendored copy. To pick up upstream changes, download https://get.chezmoi.io/lb again and re-apply the three changes listed in the header comment of public/install.

Publishing this site

The site is a Blume project (docs/, public/, blume.config.ts). .github/workflows/docs.yml builds it with bun run build and deploys dist/ to GitHub Pages on every push to master that touches the site. Pages uses GitHub Actions as its source, and dots.prd.lk is the custom domain set in the repository’s Pages settings. That domain needs a DNS CNAME record pointing to prdlk.github.io. None of these files are applied to $HOME; .chezmoiignore.tmpl excludes them.

Was this page helpful?