{ pkgs, config, ... }: { accounts.calendar = { basePath = "Calendar"; # Relative to home directory; automatically becomes ~/Calendar accounts.radicale = { primary = true; primaryCollection = null; # Set to a specific collection name if needed (e.g., "calendar") when multiple exist remote = { type = "caldav"; url = "https://dav.tammi.cc/petri.hienonen@protonmail.com"; userName = "petri.hienonen@protonmail.com"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.radicale.path}"; }; local = { type = "filesystem"; fileExt = ".ics"; }; vdirsyncer = { enable = true; collections = null; # null syncs all discovered collections; alternatively, specify ["calendar", "tasks", "journal"] metadata = [ "color" "displayname" ]; }; khal = { enable = true; type = "discover"; # "discover" for multiple collections (treats local path as directory of calendars); use "calendar" for single }; }; }; accounts.contact = { basePath = "Contacts"; # Relative to home directory; automatically becomes ~/Contacts accounts.radicale = { remote = { type = "carddav"; url = "https://dav.tammi.cc/petri.hienonen@protonmail.com"; userName = "petri.hienonen@protonmail.com"; passwordCommand = "${pkgs.coreutils}/bin/cat ${config.age.secrets.radicale.path}"; }; local = { type = "filesystem"; fileExt = ".vcf"; }; vdirsyncer = { enable = true; collections = null; metadata = [ "color" "displayname" ]; }; khard = { enable = true; }; }; }; programs.khal.enable = true; programs.khard.enable = true; programs.todoman.enable = true; # For tasks (VTODO); uses the calendar basePath to discover task lists services.vdirsyncer = { enable = true; frequency = "*:0/5"; # Sync every 5 minutes }; }