Update dotfiles/.local/share/chezmoi/home/dot_ssh/create_encrypted_private_readonly_private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-{{ .user.username }}.service.tmpl, dotfiles/.local/share/chezmoi/system-linux/usr/local/bin/executable_rclone-mount, dotfiles/.local/share/chezmoi/home/dot_cache/readonly_rclone/.gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/cache/readonly_rclone/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/etc/rcloneignore, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-docker.service, dotfiles/.local/share/chezmoi/system-linux/mnt/private_r2-docker/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/log/user/run_onchange_after-symlink-user-logs, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/log/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf
Deleted dotfiles/.local/share/chezmoi/home/dot_ssh/id_rsa.pub
2022-11-24 19:04:16 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-11-24 21:05:02 -08:00
|
|
|
{{ $sshFiles := (output "find" (joinPath .chezmoi.homeDir ".ssh") "-type" "f") -}}
|
|
|
|
{{- range $sshFile := splitList "\n" $sshFiles -}}
|
|
|
|
{{- if ne $sshFile "" -}}
|
|
|
|
# {{ $sshFile }} hash: {{ $sshFile | sha256sum }}
|
|
|
|
{{ end -}}
|
|
|
|
{{- end }}
|
Update dotfiles/.local/share/chezmoi/home/dot_ssh/create_encrypted_private_readonly_private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-{{ .user.username }}.service.tmpl, dotfiles/.local/share/chezmoi/system-linux/usr/local/bin/executable_rclone-mount, dotfiles/.local/share/chezmoi/home/dot_cache/readonly_rclone/.gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/cache/readonly_rclone/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/etc/rcloneignore, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-docker.service, dotfiles/.local/share/chezmoi/system-linux/mnt/private_r2-docker/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/log/user/run_onchange_after-symlink-user-logs, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/log/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf
Deleted dotfiles/.local/share/chezmoi/home/dot_ssh/id_rsa.pub
2022-11-24 19:04:16 -08:00
|
|
|
|
Update dotfiles/.local/share/chezmoi/home/private_dot_config/shell/encrypted_private_dot_private, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/private_dot_config/tabby/config.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/bin/executable_run, dotfiles/.local/share/chezmoi/home/private_dot_config/oh-my-posh/Betelgeuse-minimal.omp.json, dotfiles/.local/share/chezmoi/home/dot_local/state/bash/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/dot_local/state/zsh/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/.chezmoiscripts/_universal/run_onchange_after_60-cleanup.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/.config/symlink_taskfiles, dotfiles/.local/share/chezmoi/home/dot_local/symlink_Taskfile-upstream.yml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/Taskfile-local.yml, dotfiles/.local/share/chezmoi/home/private_dot_config/rofi/config.rasi.tmpl, dotfiles/.local/share/chezmoi/home/.chezmoidata.yml
Deleted dotfiles/.local/share/chezmoi/home/dot_local/state/bash/.gitkeep, dotfiles/.local/share/chezmoi/home/dot_local/state/zsh/.gitkeep
2022-11-27 08:17:07 -08:00
|
|
|
{{- includeTemplate "universal/profile" }}
|
|
|
|
{{- includeTemplate "universal/logg" }}
|
|
|
|
|
2022-12-05 11:45:18 -08:00
|
|
|
logg info 'Ensuring RSA public keys are present'
|
2022-11-24 21:05:02 -08:00
|
|
|
|
Update dotfiles/.local/share/chezmoi/home/dot_ssh/create_encrypted_private_readonly_private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-{{ .user.username }}.service.tmpl, dotfiles/.local/share/chezmoi/system-linux/usr/local/bin/executable_rclone-mount, dotfiles/.local/share/chezmoi/home/dot_cache/readonly_rclone/.gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/cache/readonly_rclone/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/etc/rcloneignore, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-docker.service, dotfiles/.local/share/chezmoi/system-linux/mnt/private_r2-docker/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/log/user/run_onchange_after-symlink-user-logs, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/log/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf
Deleted dotfiles/.local/share/chezmoi/home/dot_ssh/id_rsa.pub
2022-11-24 19:04:16 -08:00
|
|
|
find "$HOME/.ssh" -type f | while read FILE; do
|
|
|
|
if [ ! -f "${FILE}" ] && cat "$FILE" | grep 'BEGIN RSA PRIVATE KEY'; then
|
2022-12-05 11:45:18 -08:00
|
|
|
logg info 'Generating missing public key for `'"$FILE"'`'
|
Update dotfiles/.local/share/chezmoi/home/dot_ssh/create_encrypted_private_readonly_private_id_rsa.tmpl, dotfiles/.local/share/chezmoi/home/dot_ssh/run_onchanges_after_generate-public-keys, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-{{ .user.username }}.service.tmpl, dotfiles/.local/share/chezmoi/system-linux/usr/local/bin/executable_rclone-mount, dotfiles/.local/share/chezmoi/home/dot_cache/readonly_rclone/.gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/cache/readonly_rclone/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/etc/rcloneignore, dotfiles/.local/share/chezmoi/system-linux/etc/systemd/system/r2-docker.service, dotfiles/.local/share/chezmoi/system-linux/mnt/private_r2-docker/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/system-linux/var/log/user/run_onchange_after-symlink-user-logs, dotfiles/.local/share/chezmoi/home/.chezmoi.yaml.tmpl, dotfiles/.local/share/chezmoi/home/dot_local/log/remove_dot_gitkeep, dotfiles/.local/share/chezmoi/home/private_dot_config/rclone/merge_rclone.conf
Deleted dotfiles/.local/share/chezmoi/home/dot_ssh/id_rsa.pub
2022-11-24 19:04:16 -08:00
|
|
|
ssh-keygen -f "$FILE" -y > "${FILE}.pub"
|
|
|
|
fi
|
|
|
|
done
|