aboutsummaryrefslogtreecommitdiffstats
path: root/home/dav/default.nix
blob: 1706963e58f9d8d2a947690fb309fb21f903beca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
  };
}