2023-09-25 14:22:51 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2023-09-26 10:02:40 +01:00
|
|
|
programs = {
|
|
|
|
vdirsyncer.enable = true;
|
2023-10-30 07:03:37 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2023-09-26 10:02:40 +01:00
|
|
|
};
|
2023-10-01 09:17:45 +01:00
|
|
|
services.vdirsyncer.enable = true;
|
2023-09-25 14:22:51 +01:00
|
|
|
accounts.calendar = {
|
|
|
|
basePath = ".calendar";
|
2023-10-03 07:59:00 +01:00
|
|
|
accounts = let
|
|
|
|
local = {
|
|
|
|
type = "filesystem";
|
|
|
|
fileExt = ".ics";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nextcloud = rec {
|
|
|
|
inherit local;
|
2023-10-02 18:10:48 +01:00
|
|
|
primary = lib.mkDefault true;
|
2023-10-10 18:55:45 +01:00
|
|
|
primaryCollection = "personal";
|
2023-09-25 14:22:51 +01:00
|
|
|
remote = {
|
|
|
|
type = "caldav";
|
|
|
|
url = "https://cloud.xenia.me.uk/remote.php/dav";
|
|
|
|
userName = "xenia";
|
2023-09-30 10:05:47 +01:00
|
|
|
passwordCommand = [
|
|
|
|
"${pkgs.libsecret}/bin/secret-tool"
|
|
|
|
"lookup"
|
|
|
|
"url"
|
2023-09-30 10:10:32 +01:00
|
|
|
"cloud.xenia.me.uk"
|
2023-09-30 10:05:47 +01:00
|
|
|
];
|
2023-09-25 14:22:51 +01:00
|
|
|
};
|
|
|
|
vdirsyncer = {
|
2023-10-02 18:10:48 +01:00
|
|
|
enable = lib.mkDefault true;
|
2023-09-25 14:22:51 +01:00
|
|
|
collections = [ "from a" ];
|
2023-10-30 07:03:37 +00:00
|
|
|
metadata = [ "color" ];
|
2023-09-25 14:22:51 +01:00
|
|
|
};
|
2023-09-26 10:02:40 +01:00
|
|
|
khal = {
|
2023-10-03 07:59:00 +01:00
|
|
|
inherit (vdirsyncer) enable;
|
2023-09-26 10:02:40 +01:00
|
|
|
type = "discover";
|
|
|
|
};
|
2023-09-25 14:22:51 +01:00
|
|
|
};
|
2023-10-15 10:02:16 +01:00
|
|
|
outlook = let emailConfig = config.accounts.email.accounts.outlook;
|
2023-10-03 07:59:00 +01:00
|
|
|
in rec {
|
|
|
|
inherit local;
|
2023-10-10 10:20:43 +01:00
|
|
|
primary = lib.mkDefault false;
|
|
|
|
primaryCollection = "Work";
|
2023-10-15 17:02:24 +01:00
|
|
|
remote = {
|
2023-10-03 07:59:00 +01:00
|
|
|
inherit (emailConfig) userName passwordCommand;
|
2023-09-29 09:55:52 +01:00
|
|
|
type = "caldav";
|
2023-10-15 17:02:24 +01:00
|
|
|
url = "http://localhost:1080/users/${remote.userName}/calendar/";
|
2023-09-29 09:55:52 +01:00
|
|
|
};
|
2023-10-02 18:10:48 +01:00
|
|
|
vdirsyncer = {
|
2023-10-03 07:59:00 +01:00
|
|
|
enable = lib.mkDefault emailConfig.mbsync.enable;
|
2023-12-19 15:06:07 +00:00
|
|
|
collections = [ "Work" "Network" "Operations" "Other" ];
|
2023-10-02 18:10:48 +01:00
|
|
|
};
|
|
|
|
khal = {
|
2023-10-03 07:59:00 +01:00
|
|
|
inherit (vdirsyncer) enable;
|
2023-10-02 18:10:48 +01:00
|
|
|
type = "discover";
|
|
|
|
};
|
2023-09-29 09:55:52 +01:00
|
|
|
};
|
2023-09-25 14:22:51 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|