Update .local/share/chezmoi/home/dot_ssh/run_after_ensure-private-key, .local/share/chezmoi/home/dot_ssh/symlink_authorized_keys.tmpl, .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-macos.tmpl

Deleted .local/share/chezmoi/home/dot_ssh/create_private_readonly_private_id_rsa.tmpl
This commit is contained in:
Brian Zalewski 2022-12-02 04:30:27 +00:00
parent 8e2f1f6218
commit d6b2832134
4 changed files with 12 additions and 12 deletions

View file

@ -2,8 +2,8 @@
set -x set -x
{{- includeTemplate "universal/profile" }} {{ includeTemplate "universal/profile" }}
{{- includeTemplate "universal/logg" }} {{ includeTemplate "universal/logg" }}
logg 'Applying optimized macOS settings' logg 'Applying optimized macOS settings'

View file

@ -1,10 +0,0 @@
{{- $bwAuthenticated := eq (fromJson (output "bw" "status")).status "authenticated" }}
{{- if $bwAuthenticated -}}
{{- (bitwarden "item" "dev.betelgeuse.ssh.personal.id_rsa.private").notes -}}
{{- else -}}
{{- $sshLocation := (joinPath .chezmoi.homeDir ".ssh" "id_rsa") -}}
{{- if not (stat $sshLocation) -}}
{{- $sshKeygen := (output "ssh-keygen" "-b" "4096" "-t" "rsa" "-f" $sshLocation "-q" "-N") }}
{{- end -}}
{{- include $sshLocation }}
{{ end }}

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
### Ensure id_rsa is present and create one if it does not exist
if [ ! -f "$HOME/.ssh/id_rsa" ]; then
logg 'Generating missing default private key / public key (`~/.ssh/id_rsa`)'
ssh-keygen -b 4096 -t rsa -f "$HOME/.ssh/id_rsa" -q -N
fi

View file

@ -0,0 +1,3 @@
{{- if true -}}
{{ .host.home }}/.ssh/authorized_keys.github
{{- end -}}