add ssh-agent setup for linux

main
Andrew Coleman 2022-05-11 08:14:30 -04:00
parent b1352cf6f1
commit a34937643d
3 changed files with 19 additions and 0 deletions

View File

@ -90,6 +90,7 @@ pamac install \
# not available by default
#jc mbuffer
pamac build lightly-qt
systemctl enable --now --user ssh-agent.service
```
# Bitwarden

View File

@ -0,0 +1,4 @@
{{- if (eq .chezmoi.os "linux") -}}
SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
export SSH_AUTH_SOCK
{{- end -}}

View File

@ -0,0 +1,14 @@
{{- if (eq .chezmoi.os "linux") -}}
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
# DISPLAY required for ssh-askpass to work
Environment=DISPLAY=:0
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
[Install]
WantedBy=default.target
{{- end -}}