2024-09-29 11:28:52 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
home.packages = [
|
|
|
|
(pkgs.writeShellScriptBin "vdirsyncer-ensure-pass" (builtins.readFile ./vdirsyncer-ensure-pass.sh))
|
|
|
|
];
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
services.vdirsyncer.enable = true;
|
|
|
|
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;
|
|
|
|
primaryCollection = "calendar";
|
|
|
|
local = {
|
|
|
|
type = "filesystem";
|
|
|
|
fileExt = ".ics";
|
|
|
|
};
|
|
|
|
remote = {
|
|
|
|
url = "https://${url}";
|
|
|
|
type = "caldav";
|
|
|
|
userName = "pixelifytica";
|
|
|
|
passwordCommand = [
|
|
|
|
"${pkgs.libsecret}/bin/secret-tool"
|
|
|
|
"lookup"
|
|
|
|
"url"
|
|
|
|
"${url}"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|