Pre-configure SSH_AUTH_SOCK to be compatible with the ssh-agent service

If the user uses ssh-agent.service, everything will Just Work™. If they
don't, whatever online guide they're following will have instructed them
to set SSH_AUTH_SOCK in their rc file, and it will override this.

Related to #555
This commit is contained in:
Nate Graham
2026-04-29 13:45:16 -06:00
parent ea2ee0df31
commit 1e99880831

View File

@@ -118,3 +118,7 @@ source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring
# Bind Ctrl+↑ and Ctrl+↓ keybinds to substring history search.
bindkey '^[[1;5A' history-substring-search-up # Ctrl+↑
bindkey '^[[1;5B' history-substring-search-down # Ctrl+↓
# Set up auth sock for systemd-initiated ssh agent so the user doesn't
# have to faff about with this
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"