A few months ago gpg stopped working for me. The symptoms are that it can not find a pinentry program. I can work around this by manually starting the agent, however, I have the following in my configuration.nix which should start it for me.
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
However, journalctl --user -u gpg-agent
suggests that the service has not been activated since Sep 21.
$ systemctl --user status gpg-agent.service
○ gpg-agent.service - GnuPG cryptographic agent and passphrase cache
Loaded: loaded (/etc/systemd/user/gpg-agent.service; linked-runtime; vendor preset: enab>
Drop-In: /nix/store/plawdzg6rj2993finc1nb0lnkls3ympw-user-units/gpg-agent.service.d
└─overrides.conf
Active: inactive (dead)
Docs: man:gpg-agent(1)
Ok, so I try and start it
$ systemctl --user start gpg-agent.service
Failed to start gpg-agent.service: Unit gpg-agent.socket not found.
And indeed
$ systemctl --user status gpg-agent.socket
Unit gpg-agent.socket could not be found.
Poking around in the directories:
$ cat /etc/systemd/user/gpg-agent.socket
[Unit]
Description=GnuPG cryptographic agent and passphrase cache
Documentation=man:gpg-agent(1)
[Socket]
ListenStream=%t/gnupg/S.gpg-agent
FileDescriptorName=std
SocketMode=0600
DirectoryMode=0700
[Install]
WantedBy=sockets.target
$ cat /etc/systemd/user/gpg-agent.socket.d/overrides.conf
[Unit]
[Socket]
Any ideas why the socket activation is suddenly broken?