diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ce880ae --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +elisp/private.el filter=git-crypt diff=git-crypt \ No newline at end of file diff --git a/.gitignore b/.gitignore index 24a1e8d..7775240 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ /tree-sitter/ /tramp /dape-breakpoints -/private.el diff --git a/elisp/private.el b/elisp/private.el new file mode 100644 index 0000000..1257f27 Binary files /dev/null and b/elisp/private.el differ diff --git a/init.el b/init.el index cbda448..6e50c15 100644 --- a/init.el +++ b/init.el @@ -38,6 +38,12 @@ (diminish 'visual-line-mode) (diminish 'abbrev-mode)) +;; Private config loading +(require 'private nil t) +(defun my/get-private (key) + "Get the private config variable KEY from the private configuration file." + (alist-get key my/private-config)) + ;; basic stuff (use-package emacs :hook (;(emacs-lisp-mode . my/-emacs-lisp-mode-setup-evil-lookup) @@ -1279,7 +1285,6 @@ If no name is given, list all bookmarks instead." (require 'khard) ;; mu4e -(load (expand-file-name "private.el" user-emacs-directory) t) (use-package mu4e :ensure nil :defer nil @@ -1322,8 +1327,8 @@ If no name is given, list all bookmarks instead." (string-match-p "^/protonmail/" (mu4e-message-field msg :maildir)))) - :vars `((user-mail-address . ,(alist-get 'email my/mu4e-private-config)) - (user-full-name . ,(alist-get 'name my/mu4e-private-config)) + :vars `((user-mail-address . ,(my/get-private 'mu4e-email)) + (user-full-name . ,(my/get-private 'mu4e-name)) (message-signature . nil) (mu4e-refile-folder . "/protonmail/Archive") (mu4e-sent-folder . "/protonmail/Sent")