From 224d016543c2b6a160ea4deccdccf84c52736300 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Fri, 1 Jan 2021 00:00:31 +0000 Subject: [PATCH] Add password-store configuration --- config.org | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/config.org b/config.org index 319e3da..a0a09c8 100644 --- a/config.org +++ b/config.org @@ -314,3 +314,33 @@ needs to be set up to install them if they aren't already. (require 'exwm-config) (exwm-config-default)) #+end_src + +* Passwords + This was a little more work than I expected... =password-store= + provides a nice interface to =pass=: + + #+begin_src emacs-lisp + (use-package password-store) + #+end_src + + However, in order for it to actually work, EasyPG had to be + configured to use loopback for pinentry. + + #+begin_src emacs-lisp + (setq epa-pinentry-mode 'loopback) + #+end_src + + =gpg-agent= also had to be configured to allow loopback for + pinentry -- this was done by adding =allow-loopback-pinentry= to + [[file:~/.gnupg/gpg-agent.conf::allow-loopback-pinentry][gpg-agent.conf]]. + + With that all working, all that remains is to add a convenient + keybinding for getting a password, which is done by the function + =password-store-copy=. =C-c C-p= does conflict with /some/ modal + bindings, but I think that's fine as most of the time I'll need a + password it'll be in some X window anyway... and besides, =M-x + pass-co RET= isn't bad for when it does happen to conflict. + + #+begin_src emacs-lisp + (global-set-key (kbd "C-c C-p") 'password-store-copy) + #+end_src