diff options
Diffstat (limited to 'home/dav')
| -rw-r--r-- | home/dav/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/home/dav/default.nix b/home/dav/default.nix new file mode 100644 index 0000000..1706963 --- /dev/null +++ b/home/dav/default.nix @@ -0,0 +1,65 @@ +{ 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 + }; +} |
