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