You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set up gpg-agent.socket, gpg-agent-ssh.socket, gpg-agent-extra.socket, gpg-agent.service and keyboxd.service to all have BindsTo=dev-yubikey.device and After=dev-yubikey.device. I also set up a yubikey.target which Wants all of the sockets and keyboxd, and set up an udev rule to automatically start gpg-agent when I insert my yubikey. This also automatically kills gpg-agent when the yubikey is not inserted.
This helps me immensely, as I have move around between multiple machines constantly, and there are so many cases where gpg-agent will either start automatically as I SSH into a box, or be started automatically when I run git, or anything else on a long list of annoying behaviors.
Currently, the Install.WantedBy field is hard-coded here. A mkDefault in front of [ "sockets.target" ] would make it possible to simply override. That would also not merge the two lists.
Another solution I like is to make the configuration a dependency on DefaultDependencies, as you'd set that if you want to disable autostarting the service anyway.
Description
I have set up
gpg-agent.socket
,gpg-agent-ssh.socket
,gpg-agent-extra.socket
,gpg-agent.service
andkeyboxd.service
to all haveBindsTo=dev-yubikey.device
andAfter=dev-yubikey.device
. I also set up ayubikey.target
whichWants
all of the sockets and keyboxd, and set up an udev rule to automatically start gpg-agent when I insert my yubikey. This also automatically kills gpg-agent when the yubikey is not inserted.This helps me immensely, as I have move around between multiple machines constantly, and there are so many cases where gpg-agent will either start automatically as I SSH into a box, or be started automatically when I run
git
, or anything else on a long list of annoying behaviors.Currently, the
Install.WantedBy
field is hard-coded here. AmkDefault
in front of[ "sockets.target" ]
would make it possible to simply override. That would also not merge the two lists.Another solution I like is to make the configuration a dependency on
DefaultDependencies
, as you'd set that if you want to disable autostarting the service anyway.The text was updated successfully, but these errors were encountered: