diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-01 11:42:11 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-12-01 12:16:23 +0200 |
| commit | e736ed88f4b94047c2f5f9db2412aa227562287d (patch) | |
| tree | c1d1ddc3354f571f01845e219a0eb926e627bfc8 /home | |
| parent | 8ebcf6abcf38a73f015c4b461ebf45612eb78f14 (diff) | |
| download | nixos-e736ed88f4b94047c2f5f9db2412aa227562287d.tar.zst | |
Caldav/Carddav with radicale
Diffstat (limited to 'home')
| -rw-r--r-- | home/dav/default.nix | 65 | ||||
| -rw-r--r-- | home/default.nix | 2 | ||||
| -rw-r--r-- | home/mail/default.nix | 3 |
3 files changed, 70 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 + }; +} diff --git a/home/default.nix b/home/default.nix index 1509591..48d0e8b 100644 --- a/home/default.nix +++ b/home/default.nix @@ -27,6 +27,7 @@ in ./hyprland ./hyprlock ./mail + ./dav ./mpv ./newsboat (import ./nvim { inherit unstable; }) @@ -48,6 +49,7 @@ in openai_auth_token.file = ../secrets/openai_auth_token.age; relesoft_cargo_token.file = ../secrets/relesoft_cargo_token.age; shiori_password.file = ../secrets/shiori_password.age; + radicale.file = ../secrets/radicale.age; unsplash_access_key.file = ../secrets/unsplash_access_key.age; gmail = { file = ../secrets/gmail.age; diff --git a/home/mail/default.nix b/home/mail/default.nix index 775f0b0..a84f307 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -214,6 +214,9 @@ in # aerc will automatically pick up accounts from accounts.email # Additional aerc-wide configuration can go here extraConfig = { + compose = { + address-book-cmd = "khard email --parse --remove-first-line %q"; + }; general = { unsafe-accounts-conf = true; # Example aerc configuration |
