My dotfiles for Arch Linux

Make SSH key configurable

This is required to use the dotfiles in other contexts as well.

Signed-off-by: Jan Ehrhardt <59441+jehrhardt@users.noreply.github.com>

+10 -8
+5 -1
.chezmoi.toml.tmpl
··· 1 - {{- $git_email := promptStringOnce . "git_email" "Email address for Git" -}} 1 + {{- $git_email := promptStringOnce . "git_email" "Email address for Git" "59441+jehrhardt@users.noreply.github.com"}} 2 + {{- $ssh_key := promptStringOnce . "ssh_key" "SSH key" "~/.ssh/id_ed25519_sk"}} 2 3 3 4 [data.git.user] 4 5 email = {{ $git_email | quote }} 6 + 7 + [data.ssh] 8 + key = {{ $ssh_key | quote }} 5 9 6 10 [merge] 7 11 command = "nvim"
+3 -5
README.md
··· 21 21 22 22 #### SSH key 23 23 24 - Generate a new SSH key with Yubikey: 24 + Generate a new SSH key protected by Yubikey: 25 25 26 26 ```bash 27 - # use CapsLock + Space + E shortcut to enter email 28 27 # use default location for SSH key 29 - # use no passphrase as private key is protected by Yubikey 30 - ssh-keygen -t ed25519-sk -C <email> 28 + # use no passphrase 29 + ssh-keygen -t ed25519-sk -C 59441+jehrhardt@users.noreply.github.com 31 30 ``` 32 31 33 32 Login to Github and add SSH key for authentication: ··· 48 47 Init and apply chezmoi: 49 48 50 49 ```bash 51 - # when promted for email use CapsLock + Space + E shortcut 52 50 chezmoi init --ssh --apply jehrhardt 53 51 ``` 54 52
+1 -1
dot_config/private_fish/config.fish.tmpl
··· 8 8 zoxide init fish | source 9 9 chezmoi completion fish | source 10 10 starship init fish | source 11 - {{ if eq .chezmoi.os "linux" }}keychain --quiet --eval ~/.ssh/id_ed25519_sk | source{{ end }} 11 + {{ if eq .chezmoi.os "linux" }}keychain --quiet --eval {{ .ssh.key }} | source{{ end }} 12 12 end
+1 -1
dot_gitconfig.tmpl
··· 10 10 [user] 11 11 name = Jan Ehrhardt 12 12 email = {{ .git.user.email }} 13 - signingkey = ~/.ssh/id_ed25519_sk 13 + signingkey = {{ .ssh.key }} 14 14 [commit] 15 15 gpgsign = true 16 16 [gpg]