fix(emacs): use rbw for org-caldav auth instead of GPG
Some checks failed
CI / check (push) Has been cancelled

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)
This commit is contained in:
hermione
2026-01-24 17:26:54 -08:00
committed by John Ogle
parent be3c27e868
commit 1ffa8524f0

View File

@@ -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")