diff --git a/emacs/.emacs.d/config/init-1pass.el b/emacs/.emacs.d/config/init-1pass.el new file mode 100644 index 0000000..3e86dd5 --- /dev/null +++ b/emacs/.emacs.d/config/init-1pass.el @@ -0,0 +1,16 @@ +;; -*- lexical-binding: t; -*- + +(use-package 1password + :straight (:host github + :repo "xuchunyang/1password.el" + :fork (:host github :repo "jdormit/1password.el")) + :defer t + :config + (advice-add '1password-login :around + (lambda (oldfn password &rest args) + (apply oldfn (shell-quote-argument password) args))) + (1password-login (password-store-get "team-lolatravel.1password.com"))) + +(1password-get-password "jdormit-test") + +(provide 'init-1pass) diff --git a/emacs/.emacs.d/config/init-lola.el b/emacs/.emacs.d/config/init-lola.el new file mode 100644 index 0000000..973fc63 --- /dev/null +++ b/emacs/.emacs.d/config/init-lola.el @@ -0,0 +1,12 @@ +;; -*- lexical-binding: t; -*- + +;; Lola stuff + +(defun lola-core-models-prod () + "Opens a PSQL buffer to the prod core models database" + (interactive) + (let ((sql-database (1password-get-password "lola-server prod db (read-only)")) + (sql-postgres-login-params nil)) + (sql-postgres))) + +(provide 'init-lola) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 6d7e4c0..780d84b 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -101,6 +101,8 @@ (require 'init-epub) (require 'init-homebrew) (require 'init-elfeed) +(require 'init-1pass) +(require 'init-lola) (when (file-exists-p custom-file) (load custom-file 'noerror 'nomessage))