summaryrefslogtreecommitdiff
path: root/lib/calendars.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-22 13:31:18 -0500
committerBen Sima <ben@bensima.com>2025-12-22 13:31:18 -0500
commit8d9eb8fa8a20efa4c4318fccef97d21fe91fb092 (patch)
treedfe4a94d2c20653a1b97add68d96ebf5a2856317 /lib/calendars.nix
parentf8d26da7c054c0a4c89ab12993e00f74ea9260a1 (diff)
Switch to kitty terminal with ef-dream theme, emoji support
- Replace urxvt with kitty as default terminal - Add ef-dream inspired color scheme to kitty - Configure emoji font fallback with Noto Color Emoji - Update xmonad.hs to use kitty for terminal and scratchpads - Fix cmdtree to fetch from GitHub instead of broken git://jb55.com - Remove urxvt.nix and alacritty config - Add AGENTS.md for agentic coding tools
Diffstat (limited to 'lib/calendars.nix')
-rw-r--r--lib/calendars.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/calendars.nix b/lib/calendars.nix
index 265ee20..c2e9385 100644
--- a/lib/calendars.nix
+++ b/lib/calendars.nix
@@ -9,6 +9,7 @@ let
ben-shared = "ben";
kate = "0962a74ab76a97543b485d2a583caa271042baab9d64437ae6c3bc8a50df1f08";
training = "eb5dfe0a-0e60-b7e5-eb7a-3b980b50b195";
+ parasail = "ben.sima@parasail.io";
};
getCals = ls: lib.attrsets.attrVals ls calendars;
@@ -80,6 +81,23 @@ in {
vdirsyncer = common.vdirsyncer // {collections = getCals ["kate"];};
khal = common.khal // {color = "#FAA0A0";};
};
+
+ # Parasail Google Calendar - syncs to local for khal viewing
+ # and for reverse sync to ben-shared
+ "parasail" = {
+ remote = {
+ type = "google_calendar";
+ };
+ vdirsyncer = common.vdirsyncer // {
+ auth = null;
+ collections = getCals ["parasail"];
+ itemTypes = ["VEVENT"];
+ tokenFile = "${config.xdg.dataHome}/vdirsyncer/parasail.token";
+ clientIdCommand = ["${pkgs.pass}/bin/pass" "parasail/calendar-client-id"];
+ clientSecretCommand = ["${pkgs.pass}/bin/pass" "parasail/calendar-client-secret"];
+ };
+ khal = common.khal // {color = "#4285F4";};
+ };
};
programs.khal = {
@@ -116,5 +134,42 @@ in {
b = "calendar_bensima_scheduling_remote"
collections = [${pair "a_to_b" ["ben-shared" "scheduling"]}]
conflict_resolution = "a wins"
+
+ # One-way sync: ben-shared → parasail Google Calendar
+ # Uses patched vdirsyncer that skips NotFoundError for missing items
+ # (works around Google CalDAV bug with recurring events)
+ [storage calendar_shared_readonly]
+ type = "filesystem"
+ path = "${config.home.homeDirectory}/Calendars/bensima_shared"
+ fileext = ".ics"
+ read_only = true
+
+ [storage calendar_parasail_remote_direct]
+ type = "google_calendar"
+ token_file = "${config.xdg.dataHome}/vdirsyncer/parasail.token"
+ client_id.fetch = ["command", "${pkgs.pass}/bin/pass", "parasail/calendar-client-id"]
+ client_secret.fetch = ["command", "${pkgs.pass}/bin/pass", "parasail/calendar-client-secret"]
+ item_types = ["VEVENT"]
+
+ [pair shared_to_parasail]
+ a = "calendar_shared_readonly"
+ b = "calendar_parasail_remote_direct"
+ collections = [["ben_to_parasail", "ben", "ben.sima@parasail.io"]]
+ conflict_resolution = "a wins"
+ partial_sync = "ignore"
+
+ # Reverse sync: parasail → ben-shared (so wife sees work busy times)
+ [storage calendar_parasail_local_readonly]
+ type = "filesystem"
+ path = "${config.home.homeDirectory}/Calendars/parasail"
+ fileext = ".ics"
+ read_only = true
+
+ [pair parasail_to_shared]
+ a = "calendar_parasail_local_readonly"
+ b = "calendar_bensima_shared_remote"
+ collections = [["parasail_to_ben", "ben.sima@parasail.io", "ben"]]
+ conflict_resolution = "a wins"
+ partial_sync = "ignore"
'';
}