Set epa-{file-encrypt-to,pinentry-mode}; no authinfo for sudo via tramp
This commit is contained in:
parent
59846473ca
commit
13111ff5c4
2 changed files with 12 additions and 2 deletions
11
core/core.el
11
core/core.el
|
@ -105,6 +105,17 @@ melodramatic ex-vimmer disappointed with the text-editor status quo."
|
||||||
url-cache-directory (concat doom-cache-dir "url/")
|
url-cache-directory (concat doom-cache-dir "url/")
|
||||||
url-configuration-directory (concat doom-etc-dir "url/"))
|
url-configuration-directory (concat doom-etc-dir "url/"))
|
||||||
|
|
||||||
|
(after! epa
|
||||||
|
(setq epa-file-encrypt-to (or epa-file-encrypt-to user-mail-address)
|
||||||
|
;; With GPG 2.1, this lets Emacs prompt for gpg key passphrases
|
||||||
|
epa-pinentry-mode 'loopback))
|
||||||
|
|
||||||
|
(defun doom*no-authinfo-for-tramp (orig-fn &rest args)
|
||||||
|
"Don't look into .authinfo for local sudo TRAMP buffers."
|
||||||
|
(let ((auth-sources (if (equal tramp-current-method "sudo") nil auth-sources)))
|
||||||
|
(apply orig-fn args)))
|
||||||
|
(advice-add #'tramp-read-passwd :around #'doom*no-authinfo-for-tramp)
|
||||||
|
|
||||||
;; move custom defs out of init.el
|
;; move custom defs out of init.el
|
||||||
(setq custom-file (concat doom-etc-dir "custom.el"))
|
(setq custom-file (concat doom-etc-dir "custom.el"))
|
||||||
(load custom-file t t)
|
(load custom-file t t)
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
:commands org-crypt-use-before-save-magic
|
:commands org-crypt-use-before-save-magic
|
||||||
:config
|
:config
|
||||||
(setq org-tags-exclude-from-inheritance '("crypt")
|
(setq org-tags-exclude-from-inheritance '("crypt")
|
||||||
org-crypt-key user-mail-address
|
org-crypt-key user-mail-address))
|
||||||
epa-file-encrypt-to user-mail-address))
|
|
||||||
|
|
||||||
(def-package! org-bullets
|
(def-package! org-bullets
|
||||||
:commands org-bullets-mode)
|
:commands org-bullets-mode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue