fix(emacs): use rbw for org-caldav auth instead of GPG
Some checks failed
CI / check (push) Has been cancelled
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:
@@ -86,7 +86,7 @@
|
|||||||
;; org-caldav: Sync Org entries with Nextcloud CalDAV
|
;; org-caldav: Sync Org entries with Nextcloud CalDAV
|
||||||
;; Setup requirements:
|
;; Setup requirements:
|
||||||
;; 1. Create Nextcloud app password: Settings -> Security -> Devices & sessions
|
;; 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
|
;; 3. Run: doom sync
|
||||||
;; 4. Test: M-x org-caldav-sync
|
;; 4. Test: M-x org-caldav-sync
|
||||||
;;
|
;;
|
||||||
@@ -97,11 +97,22 @@
|
|||||||
:commands (org-caldav-sync)
|
:commands (org-caldav-sync)
|
||||||
:init
|
:init
|
||||||
(map! :leader
|
(map! :leader
|
||||||
:desc "Sync calendar" "o C" #'org-caldav-sync)
|
:desc "Sync calendar" "o C" #'my/org-caldav-sync-with-rbw)
|
||||||
:config
|
:config
|
||||||
;; Nextcloud CalDAV base URL
|
;; Nextcloud CalDAV base URL
|
||||||
(setq org-caldav-url "https://nextcloud.johnogle.info/remote.php/dav/calendars/johno")
|
(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
|
;; Timezone for iCalendar export
|
||||||
(setq org-icalendar-timezone "America/Los_Angeles")
|
(setq org-icalendar-timezone "America/Los_Angeles")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user