From 7ef1785a0f1221a539b2a80f89943a145a3642ed Mon Sep 17 00:00:00 2001 From: servius Date: Fri, 20 Feb 2026 02:57:27 +0530 Subject: [PATCH] feat: Added caldav --- home/accounts/fastmail.nix | 81 ++++++++++++++++++++++++-------------- home/programs/calendar.nix | 6 +++ home/programs/default.nix | 7 ++-- secrets/secrets.yaml | 6 ++- 4 files changed, 66 insertions(+), 34 deletions(-) create mode 100644 home/programs/calendar.nix diff --git a/home/accounts/fastmail.nix b/home/accounts/fastmail.nix index cbcec9b1..c6dd56a9 100644 --- a/home/accounts/fastmail.nix +++ b/home/accounts/fastmail.nix @@ -5,37 +5,60 @@ }: { sops = { secrets."accounts/mail/fastmail" = {}; + secrets."accounts/calendar/fastmail" = {}; }; - accounts.email = { - maildirBasePath = "Mail"; - accounts = { - fastmail = rec { - maildir = { - path = "fastmail"; + accounts = { + email = { + maildirBasePath = "Mail"; + accounts = { + fastmail = rec { + maildir = { + path = "fastmail"; + }; + primary = true; + address = "email@uttarayan.me"; + aliases = ["servius@darksailor.dev"]; + userName = address; + realName = "Uttarayan Mondal"; + imap = { + host = "imap.fastmail.com"; + port = 993; + tls.enable = true; + # authentication = "login"; + }; + smtp = { + host = "smtp.fastmail.com"; + port = 465; + tls.enable = true; + }; + imapnotify = { + enable = true; + }; + passwordCommand = ["cat" "${config.sops.secrets."accounts/mail/fastmail".path}"]; + mbsync = { + enable = true; + create = "both"; + }; }; - primary = true; - address = "email@uttarayan.me"; - aliases = ["servius@darksailor.dev"]; - userName = address; - realName = "Uttarayan Mondal"; - imap = { - host = "imap.fastmail.com"; - port = 993; - tls.enable = true; - # authentication = "login"; - }; - smtp = { - host = "smtp.fastmail.com"; - port = 465; - tls.enable = true; - }; - imapnotify = { - enable = true; - }; - passwordCommand = ["cat" "${config.sops.secrets."accounts/mail/fastmail".path}"]; - mbsync = { - enable = true; - create = "both"; + }; + }; + calendar = { + basePath = "Calendar"; + accounts = { + fastmail = { + remote = { + url = "https://caldav.fastmail.com/dav/calendars/user/email@uttarayan.me"; + userName = "email@uttarayan.me"; + passwordCommand = ["cat" "${config.sops.secrets."accounts/calendar/fastmail".path}"]; + type = "caldav"; + }; + khal = { + enable = true; + addresses = ["email@uttarayan.me"]; + }; + vdirsyncer = { + enable = true; + }; }; }; }; diff --git a/home/programs/calendar.nix b/home/programs/calendar.nix new file mode 100644 index 00000000..150449df --- /dev/null +++ b/home/programs/calendar.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + programs.khal.enable = true; + programs.qcal.enable = true; + programs.vdirsyncer.enable = true; + accounts.calendar.accounts.fastmail.qcal.enable = true; +} diff --git a/home/programs/default.nix b/home/programs/default.nix index 6718b78c..82b461e1 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -28,6 +28,7 @@ ./alejandra.nix ./aria2.nix ./ast-grep.nix + ./attic.nix ./atuin.nix ./bat.nix ./binwalk.nix @@ -35,8 +36,10 @@ ./bottom.nix ./btop.nix ./cachix.nix + ./calendar.nix ./carapace.nix ./cargo.nix + ./cfcli.nix ./ddcbacklight.nix ./deploy-rs.nix ./direnv.nix @@ -55,6 +58,7 @@ ./himalaya.nix ./hyprshade.nix ./jq.nix + ./jujutsu.nix ./just.nix ./ncpamixer.nix ./neomutt.nix @@ -78,8 +82,5 @@ ./yazi.nix ./yt-dlp.nix ./zoxide.nix - ./attic.nix - ./cfcli.nix - ./jujutsu.nix ]; } diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index 68f7fdd5..bc70dbec 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -6,6 +6,8 @@ paperless: accounts: mail: fastmail: ENC[AES256_GCM,data:WCqmJqUjJz/mUdVB9xDvYQ==,iv:uU3X7/doSz6v0c8eHfB6riOkxWoWqYhbsoexaZwdb4Q=,tag:0oSRXo93siNQDlOgPA3Hsw==,type:str] + calendar: + fastmail: ENC[AES256_GCM,data:pjTLouC7hVSdjb14UmCM7g==,iv:YdznLQUxf5YFl1AhdZE1sj1MiIOPEBhCbxM8EB4ye8c=,tag:H55Nk8rAsDkSsPJRm+9L5Q==,type:str] gitea: registration: ENC[AES256_GCM,data:1FVvZF6e4AQK09Qd/hTqCvAEsnKyNztcQ6gFWHprMSNHkodNoyAyZg==,iv:ftnk06e9XV8+ZFupnV4I4a4he1ne9jAzmihli5Vt6h8=,tag:5+Tqzh/dSSWB221h01ftyQ==,type:str] llama: @@ -117,7 +119,7 @@ sops: VGZKdHpVeFRpQUxtSEkyaEhLMlBJcGsKLb0DvPNZosPBUuiX6qz1s5IO5INQh8CK ZtXTVClwMSmaUYhdSB2gKFrKVZHXTJZ4oAL5t/BpC0pOHyr+o96T3Q== -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-02-18T10:39:02Z" - mac: ENC[AES256_GCM,data:fz+15A9C6G4x3OUzoKY3yvUt75dx2aql2GEmnuJcPM1YC9KN083PodKQR1axr23w7C9S2/iTXEnYJhx3X+dfoJbTRWKVvraGHWQ9w5jbjVMVfU+97JxrtykdwXKmwlzTbF4lakHd4dWRv5e9aR7vN2JX1NUd9EuazQ0/xPeIVOQ=,iv:l4/r/poWY5IdKrM0IxbdWfg6JB7r+tssh9LIZDSNr8w=,tag:HE3C7LzWrzCKE91VdZnqXg==,type:str] + lastmodified: "2026-02-19T21:23:49Z" + mac: ENC[AES256_GCM,data:Pey0VPpH1lZazbAqHrrwuoEHZL2Pi7uMV/tR8aLGI958JHDxuHZK41YEOsMa+aiOtiJclgRvO8iOb0oDESsVO5hDTCou7/sJe2Epk62lEclTiho+QnjhnEmP2qYcuWfR1PVwk/n/wkPWm+rBsYGH7PpQZeYUznWQaHPZPFNnIPw=,iv:KTe0Quu/MJA17BivQDCTnBi5IAGtq6x0GKaqm4MuUUo=,tag:IPehj8blXzuEr0HN85y4eg==,type:str] unencrypted_suffix: _unencrypted version: 3.11.0