# SSH config — chezmoi-templated so each machine renders its own version. # # The {{ if ne .chezmoi.hostname "" }} guards prevent a machine # from generating a Host stanza for itself (which would loop back). # # To use: copy to private_dot_ssh/config.tmpl in your fork, replace # the placeholder host aliases / hostnames with your real fleet, and # replace the tokens with the matching user from fleet.yaml. # ── Fleet machines ────────────────────────────────────────────── {{ if ne (lower .chezmoi.hostname) "laptop1" }} Host laptop1 HostName laptop1 User IdentityFile ~/.ssh/id_ed25519 StrictHostKeyChecking accept-new {{ end }} {{ if ne (lower .chezmoi.hostname) "laptop2" }} Host laptop2 HostName laptop2 User IdentityFile ~/.ssh/id_ed25519 StrictHostKeyChecking accept-new {{ end }} {{ if ne (lower .chezmoi.hostname) "desktop" }} Host desktop HostName desktop User IdentityFile ~/.ssh/id_ed25519 StrictHostKeyChecking accept-new {{ end }} # ── External hosts (servers, etc.) ────────────────────────────── # Host my-vps # HostName vps.example.com # User root # IdentityFile ~/.ssh/id_ed25519_vps # encrypt via `chezmoi add --encrypt`