diff options
| author | Mike Vink <ivi@vinkies.net> | 2024-01-16 23:09:05 +0100 |
|---|---|---|
| committer | Mike Vink <ivi@vinkies.net> | 2024-01-16 23:09:05 +0100 |
| commit | 19c53f08b2476d2e3d0cdb506a3896f6f9738a68 (patch) | |
| tree | 7f7e841cb3efdae960b2ab640b13f5b65a399a3e /profiles/station | |
| parent | 902e9a96aa3ef853139c5af402d2f5bd83b96a38 (diff) | |
fixup: add contacts
Diffstat (limited to 'profiles/station')
| -rw-r--r-- | profiles/station/caldav.nix | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/profiles/station/caldav.nix b/profiles/station/caldav.nix index 67a26d3..dc157c4 100644 --- a/profiles/station/caldav.nix +++ b/profiles/station/caldav.nix @@ -1,11 +1,20 @@ -{ lib, ... }: with lib; { +{ config, lib, pkgs, ... }: with lib; { + environment.systemPackages = with pkgs; [khard]; hm = { - accounts.calendar.basePath = "Cal"; + xdg.configFile."khard/khard.conf".text = '' + [addressbooks] + [[mike]] + path = ${config.hm.accounts.contact.accounts.mike.local.path}/contacts + + [general] + default_action=list + ''; services.vdirsyncer.enable = true; programs = { vdirsyncer.enable = true; khal.enable = true; }; + accounts.calendar.basePath = "Cal"; accounts.calendar.accounts = { mike = { primary = true; @@ -32,5 +41,25 @@ }; }; }; + accounts.contact.basePath = "Cal"; + accounts.contact.accounts = { + mike = { + local = { + type = "filesystem"; + fileExt = ".vcf"; + }; + remote = { + type = "carddav"; + url = "https://cal.${ivi.domain}"; + userName = "mike"; + passwordCommand = ["echo" "''"]; + }; + vdirsyncer = { + enable = true; + collections = ["contacts"]; + conflictResolution = "remote wins"; + }; + }; + }; }; } |
