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:
parent
8e2f1f6218
commit
d6b2832134
4 changed files with 12 additions and 12 deletions
|
@ -2,8 +2,8 @@
|
|||
|
||||
set -x
|
||||
|
||||
{{- includeTemplate "universal/profile" }}
|
||||
{{- includeTemplate "universal/logg" }}
|
||||
{{ includeTemplate "universal/profile" }}
|
||||
{{ includeTemplate "universal/logg" }}
|
||||
|
||||
logg 'Applying optimized macOS settings'
|
||||
|
||||
|
|
|
@ -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 }}
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
{{- if true -}}
|
||||
{{ .host.home }}/.ssh/authorized_keys.github
|
||||
{{- end -}}
|
Loading…
Reference in a new issue