systemd: start ssh-agent from systemd

This commit is contained in:
Vincent Bernat 2020-04-04 17:06:32 +02:00
parent c4fdd97bec
commit 01cfa52e95
3 changed files with 10 additions and 0 deletions

View file

@ -5,6 +5,7 @@ After=autorandr@%i.service
After=compton@%i.service After=compton@%i.service
After=xsettingsd@%i.service After=xsettingsd@%i.service
After=tmux.service After=tmux.service
After=ssh-agent.service
Before=nm-applet@%i.service Before=nm-applet@%i.service
Before=wallpaper@%i.service Before=wallpaper@%i.service

View file

@ -14,3 +14,4 @@ Wants=xiccd@%i.service
Wants=xsettingsd@%i.service Wants=xsettingsd@%i.service
Wants=xss-lock@%i.service Wants=xss-lock@%i.service
Wants=tmux.service Wants=tmux.service
Wants=ssh-agent.socket

View file

@ -0,0 +1,8 @@
[Unit]
Description=SSH key agent
[Service]
Type=simple
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK
ExecStart=/usr/bin/dbus-update-activation-environment SSH_AUTH_SOCK=$SSH_AUTH_SOCK