Commit 700085fc6b45

Vincent Demeester <vincent@sbr.pm>
2025-03-19 22:37:32
tools/emacs: remove password-store and …
use my own little function to get password. I don't really need anything more for now. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent deacf1c
Changed files (2)
tools
emacs
users
vincent
tools/emacs/config/config-misc.el
@@ -3,6 +3,18 @@
 ;;; Miscellaneous modes configuration
 ;;; Code:
 
+;; (use-package password-store
+;;   :custom
+;;   (password-store-executable "passage"))
+
+(defvar passage-program "passage"
+  "The path to the `passage` executable.")
+
+(defun passage-get (password-name)
+  "Return the password for PASSWORD-NAME from `passage show`."
+  (let ((password (shell-command-to-string (concat passage-program " show " (shell-quote-argument password-name)))))
+    (string-trim password))) ; Trim whitespace here
+
 (use-package helpful
   :unless noninteractive
   :bind (("C-h f" . helpful-callable)
users/vincent/dev/emacs.nix
@@ -120,6 +120,7 @@ let
     outline-indent
     ox-pandoc
     pandoc-mode
+    # password-store
     pkgs.bookmark-plus # Do I use it ?
     popper
     project-rootfile