From 1ffa8524f0482218f0ac88d6c3c833a4d000cef0 Mon Sep 17 00:00:00 2001 From: hermione Date: Sat, 24 Jan 2026 17:26:54 -0800 Subject: [PATCH] fix(emacs): use rbw for org-caldav auth instead of GPG GPG isn't installed, so .authinfo.gpg approach doesn't work. Added wrapper function my/org-caldav-sync-with-rbw that fetches credentials from rbw before calling org-caldav-sync. Setup: rbw add nextcloud-caldav (app password as secret) --- home/roles/emacs/doom/config.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/home/roles/emacs/doom/config.el b/home/roles/emacs/doom/config.el index f1c1ad8..c57c70e 100644 --- a/home/roles/emacs/doom/config.el +++ b/home/roles/emacs/doom/config.el @@ -86,7 +86,7 @@ ;; org-caldav: Sync Org entries with Nextcloud CalDAV ;; Setup requirements: ;; 1. Create Nextcloud app password: Settings -> Security -> Devices & sessions -;; 2. Store in rbw: rbw add nextcloud-caldav (username in notes, app password as secret) +;; 2. Store in rbw: rbw add nextcloud-caldav (put app password as the secret) ;; 3. Run: doom sync ;; 4. Test: M-x org-caldav-sync ;; @@ -97,11 +97,22 @@ :commands (org-caldav-sync) :init (map! :leader - :desc "Sync calendar" "o C" #'org-caldav-sync) + :desc "Sync calendar" "o C" #'my/org-caldav-sync-with-rbw) :config ;; Nextcloud CalDAV base URL (setq org-caldav-url "https://nextcloud.johnogle.info/remote.php/dav/calendars/johno") + ;; Configure auth using rbw (bypasses need for GPG/.authinfo.gpg) + (defun my/org-caldav-sync-with-rbw () + "Run org-caldav-sync with credentials from rbw." + (interactive) + (let* ((password (my/get-rbw-password "nextcloud-caldav")) + (auth-entry (list "nextcloud.johnogle.info:443" + (cons "johno" password)))) + ;; Set up URL auth cache + (setq url-http-basic-auth-storage (list auth-entry)) + (org-caldav-sync))) + ;; Timezone for iCalendar export (setq org-icalendar-timezone "America/Los_Angeles")