From ebaa28d22ab48fd27de2dfdacb5c724d00a16647 Mon Sep 17 00:00:00 2001 From: Kenny Ballou Date: Wed, 23 Mar 2022 14:16:06 -0600 Subject: config: gnupg: fix gpg-agent decryption Decryption would fail with no pinentry error, generating a new agent configuration which includes a reference to a default pinentry program seems to resolve the issue. Signed-off-by: Kenny Ballou --- kbg/services/config/gnupg.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'kbg/services') diff --git a/kbg/services/config/gnupg.scm b/kbg/services/config/gnupg.scm index 442a0119..3a851f9c 100644 --- a/kbg/services/config/gnupg.scm +++ b/kbg/services/config/gnupg.scm @@ -2,14 +2,24 @@ #:use-module (kbg) #:use-module (gnu) #:use-module (guix) + #:use-module (gnu packages gnupg) #:use-module (gnu home services)) +(define gpg-agent-config + (mixed-text-file "gpg-agent.conf" + "enable-ssh-support\n" + "pinentry-program " pinentry-gnome3 "/bin/pinentry-gnome3\n" + "default-cache-ttl 28800\n" + "max-cache-ttl 43200\n" + "allow-emacs-pinentry\n" + "allow-loopback-pinentry\n")) + (define-public gnupg-config-service (list (simple-service 'gnupg-config home-files-service-type `(("gnupg/gpg.conf" ,(local-file (string-append %dotfiles-root "config/gnupg/gpg.conf"))) ("gnupg/gpg-agent.conf" - ,(local-file (string-append %dotfiles-root "config/gnupg/gpg-agent.conf"))) + ,gpg-agent-config) ("gnupg/scdaemon.conf" ,(local-file (string-append %dotfiles-root "config/gnupg/scdaemon.conf"))))))) -- cgit v1.2.1