feat: install script re-org

This commit is contained in:
2026-02-13 15:13:12 +00:00
parent faf3bf2dfc
commit eb958a36e0
26 changed files with 5 additions and 3 deletions

29
install.d/20-ssh.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Print SSH key.
#
# Skip in Codespaces (managed by GitHub)
[[ "$DOTS_ENV" == "codespaces" ]] && { log_skip "Codespaces"; return 0; }
# Skip if explicitly disabled
[[ -n "$SKIP_SSH_CONFIG" ]] && { log_skip "SKIP_SSH_CONFIG is set"; return 0; }
ssh_method="ed25519"
ssh_target="${HOME}/.ssh"
ssh_key="${ssh_target}/id_${ssh_method}"
ssh_pub="${ssh_key}.pub"
if [ ! -f "$ssh_key" ]; then
ssh-keygen \
-t "$ssh_method" \
-f "$ssh_key" \
-C "$(whoami)@$(hostname)-$(date -I)"
fi
cat "$ssh_pub"
unset ssh_method ssh_target ssh_key ssh_pub
log_pass "SSH key configured"