From 20933e207daf929a6feb5dfa265fe40ce33a0aea Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Wed, 7 Aug 2024 15:40:44 -0700 Subject: [PATCH] Change to git-crypt --- .gitattributes | 1 + .gitignore | 1 - elisp/private.el | Bin 0 -> 271 bytes init.el | 11 ++++++++--- 4 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .gitattributes create mode 100644 elisp/private.el 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 0000000000000000000000000000000000000000..1257f27dee6aaa967c9d80d5f95e1527e5d4ce28 GIT binary patch literal 271 zcmV+q0r36+M@dveQdv+`00R#Gzy`;E6|jI-;YT*TQ`(Ok<1-HI1t*_gQCxSrweUm# z6VR{uaLp3qv~`2a6Y74#`(3JMxUw-b*L+(h$LIH(3_Ch{tkZ0#-3N~9|TgqZ*U literal 0 HcmV?d00001 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")