diff --git a/emacs/.emacs.modular/config/init-auth.el b/emacs/.emacs.modular/config/init-auth.el new file mode 100644 index 0000000..ad58124 --- /dev/null +++ b/emacs/.emacs.modular/config/init-auth.el @@ -0,0 +1,27 @@ +;; Get a nice interface to pass +(use-package pass + :commands pass + :init + (leader-def-key "P" '(nil :which-key "passwords")) + :config + (evil-collection-pass-setup) + (defun password-store-synchronize () + (interactive) + (with-editor-async-shell-command "pass git pull && pass git push")) + :general + (leader-map "Pp" #'pass) + (normal pass-mode-map "S" #'password-store-synchronize)) + +(use-package password-store + :init + (epa-file-enable) + :general + (leader-map "Pg" #'password-store-copy) + :custom + (password-store-password-length 20)) + +;; Use pass as an auth source +(require 'auth-source-pass) +(auth-source-pass-enable) + +(provide 'init-auth) diff --git a/emacs/.emacs.modular/init.el b/emacs/.emacs.modular/init.el index 39fea14..69f6517 100644 --- a/emacs/.emacs.modular/init.el +++ b/emacs/.emacs.modular/init.el @@ -27,6 +27,7 @@ (require 'init-defaults) (require 'init-evil) (require 'init-keybindings) +(require 'init-auth) (require 'init-dashboard) (require 'init-dotfiles) (require 'init-buffers)