~sumner/home-manager-config

abd7f4a9394f2eaa00408951bce84f5a1e959717 — Sumner Evans 2 days ago fbdc055 master
calendar: add work calendars
2 files changed, 23 insertions(+), 0 deletions(-)

M modules/calendar/khal.nix
M modules/calendar/vdirsyncer.nix
M modules/calendar/khal.nix => modules/calendar/khal.nix +4 -0
@@ 11,6 11,10 @@
    path = ${config.xdg.dataHome}/vdirsyncer/contacts/addressbook
    type = birthdays

    [[beeper_calendar_local]]
    path = ${config.xdg.dataHome}/vdirsyncer/work-calendars/*
    type = discover

    [locale]
    timeformat = %H:%M
    dateformat = %Y-%m-%d

M modules/calendar/vdirsyncer.nix => modules/calendar/vdirsyncer.nix +19 -0
@@ 61,5 61,24 @@ in

      # Calendar
      ${mkPair { name = "calendars"; metadata = [ "displayname" "color" ]; }}

      # Work Calendar
      [pair beeper_google_calendar]
      a = "beeper_google_calendar_local"
      b = "beeper_google_calendar_remote"
      collections = ["from a", "from b"]
      conflict_resolution = "b wins"
      metadata = [ "displayname", "color" ]

      [storage beeper_google_calendar_local]
      type = "filesystem"
      path = "${config.xdg.dataHome}/vdirsyncer/work-calendars/"
      fileext = ".ics"

      [storage beeper_google_calendar_remote]
      type = "google_calendar"
      token_file = "${config.xdg.dataHome}/vdirsyncer/beeper_google_calendar_token_file"
      client_id.fetch = ["command", "${pkgs.pass}/bin/pass", "vdirsyncer/gcp_client_id"]
      client_secret.fetch = ["command", "${pkgs.pass}/bin/pass", "vdirsyncer/gcp_client_secret"]
    '';
}