2024-09-29 11:28:52 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
programs = {
|
|
|
|
vdirsyncer.enable = true;
|
|
|
|
khal = {
|
|
|
|
enable = true;
|
|
|
|
locale = {
|
|
|
|
timeformat = "%H:%M";
|
|
|
|
dateformat = "%Y-%m-%d";
|
|
|
|
longdateformat = "%Y-%m-%d %a";
|
|
|
|
datetimeformat = "%Y-%m-%d %H:%M";
|
|
|
|
longdatetimeformat = "%Y-%m-%d %H:%M";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-13 13:27:40 +01:00
|
|
|
services.vdirsyncer = {
|
|
|
|
inherit (config.programs.vdirsyncer) enable package;
|
|
|
|
frequency = "*:0/30"; # Every 30 minutes
|
|
|
|
};
|
2024-09-29 11:28:52 +01:00
|
|
|
accounts.calendar = {
|
|
|
|
basePath = "Calendar";
|
|
|
|
accounts = {
|
2024-10-07 09:39:07 +01:00
|
|
|
main =
|
2024-09-29 11:28:52 +01:00
|
|
|
let
|
|
|
|
url = "dav.xenia.me.uk";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
primary = true;
|
2024-10-07 17:43:51 +01:00
|
|
|
primaryCollection = "personal";
|
2024-09-29 11:28:52 +01:00
|
|
|
local = {
|
|
|
|
type = "filesystem";
|
|
|
|
fileExt = ".ics";
|
|
|
|
};
|
2024-10-16 07:52:52 +01:00
|
|
|
remote =
|
|
|
|
let
|
|
|
|
userName = "pixelifytica";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit userName;
|
|
|
|
url = "https://${url}";
|
|
|
|
type = "caldav";
|
|
|
|
passwordCommand = [
|
|
|
|
"${pkgs.libsecret}/bin/secret-tool"
|
|
|
|
"lookup"
|
|
|
|
"url"
|
|
|
|
"${url}"
|
|
|
|
"user"
|
|
|
|
"${userName}"
|
|
|
|
];
|
|
|
|
};
|
2024-09-29 11:28:52 +01:00
|
|
|
vdirsyncer = {
|
|
|
|
inherit (config.programs.vdirsyncer) enable;
|
|
|
|
auth = "basic";
|
2024-10-07 09:39:07 +01:00
|
|
|
collections = [
|
|
|
|
"personal"
|
|
|
|
"work"
|
|
|
|
"other"
|
2024-09-29 11:28:52 +01:00
|
|
|
];
|
2024-10-07 09:39:07 +01:00
|
|
|
metadata = [ "displayname" ];
|
2024-09-29 11:28:52 +01:00
|
|
|
timeRange = {
|
|
|
|
start = "datetime.now() - timedelta(days=365)";
|
|
|
|
end = "datetime.now() + timedelta(days=365)";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
khal = {
|
|
|
|
inherit (config.programs.khal) enable;
|
|
|
|
type = "discover";
|
|
|
|
addresses = with config.accounts.email.accounts.proton; [ address ] ++ aliases;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|