Bug#961311: ssh-agent.service: cannot work without x11-common installed
Simpler unit without a wrapper:
[Unit]
Description=OpenSSH Agent
Documentation=man:ssh-agent(1)
Before=graphical-session-pre.target
Wants=dbus.socket
After=dbus.socket
[Service]
Type=exec
ExecStart=/usr/bin/ssh-agent -D -a "%t/ssh-agent.socket"
ExecStartPost=systemctl --user set-environment "SSH_AUTH_SOCK=%t/ssh-agent.socket"
ExecStopPost=systemctl --user unset-environment SSH_AUTH_SOCK
[Install]
WantedBy=default.target
Reply to: