From 3fad3b9758c886d9b18819eafda59148bc157b89 Mon Sep 17 00:00:00 2001 From: finga Date: Thu, 29 Jun 2023 08:43:38 +0200 Subject: [PATCH] gpg: Add config to ask for the gpg passphrase In order for emacs to be able to cope with gpg, the following lines have to be configured in `~/.gnupg/gpg-agent.conf`: ``` pinentry-program /usr/bin/pinentry-tty allow-loopback-entry ``` --- .emacs.d/config/gpg.el | 3 +++ .emacs.d/init.el | 2 +- .gitignore.d/emacs | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .emacs.d/config/gpg.el diff --git a/.emacs.d/config/gpg.el b/.emacs.d/config/gpg.el new file mode 100644 index 0000000..78544cb --- /dev/null +++ b/.emacs.d/config/gpg.el @@ -0,0 +1,3 @@ +(use-package pinentry + :init + (setq epa-pinentry-mode 'loopback)) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b852a58..7532959 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -57,7 +57,7 @@ symbols, which are converted to strings, and suffixed with \".el\"." :group 'config-snippets :type '(repeat directory)) -(setq config-snippets '(base backups calendar dev functions org pass wl)) +(setq config-snippets '(base backups calendar dev functions gpg org pass wl)) (message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path) (dolist (snippet config-snippets) diff --git a/.gitignore.d/emacs b/.gitignore.d/emacs index 0f60ff8..3d86d86 100644 --- a/.gitignore.d/emacs +++ b/.gitignore.d/emacs @@ -4,6 +4,7 @@ !/.emacs.d/config/calendar.el !/.emacs.d/config/dev.el !/.emacs.d/config/functions.el +!/.emacs.d/config/gpg.el !/.emacs.d/config/org.el !/.emacs.d/config/pass.el !/.emacs.d/config/tramp.el