only use ssh-agent in wsl

main
Andrew Coleman 2022-08-19 14:58:57 -04:00
parent c0c4e962b6
commit cb88b74f1d
2 changed files with 1 additions and 6 deletions

View File

@ -7,7 +7,7 @@
.ssh/github
.ssh/github.pub
{{- end }}
{{- if ne .chezmoi.os "linux" }}
{{- if not (contains "microsoft" .chezmoi.kernel.osrelease) }}
.config/bash/ssh-agent.sh
.config/bash/xhost.sh
.config/systemd/

View File

@ -1,4 +1,3 @@
{{- if (contains "microsoft" .chezmoi.kernel.osrelease) -}}
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
eval $(ssh-agent -s) > /dev/null
@ -6,7 +5,3 @@ else
export SSH_AGENT_PID=$(pgrep ssh-agent)
export SSH_AUTH_SOCK=$(find /tmp/ssh-* -name agent.*)
fi
{{- else -}}
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export SSH_AUTH_SOCK
{{ end }}