73 lines
1.8 KiB
Nix
73 lines
1.8 KiB
Nix
{ config, lib, 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";
|
|
};
|
|
};
|
|
};
|
|
services.vdirsyncer.enable = true;
|
|
accounts.calendar = {
|
|
basePath = ".calendar";
|
|
accounts = let
|
|
local = {
|
|
type = "filesystem";
|
|
fileExt = ".ics";
|
|
};
|
|
in {
|
|
nextcloud = rec {
|
|
inherit local;
|
|
primary = lib.mkDefault true;
|
|
primaryCollection = "personal";
|
|
remote = {
|
|
type = "caldav";
|
|
url = "https://cloud.xenia.me.uk/remote.php/dav";
|
|
userName = "xenia";
|
|
passwordCommand = [
|
|
"${pkgs.libsecret}/bin/secret-tool"
|
|
"lookup"
|
|
"url"
|
|
"cloud.xenia.me.uk"
|
|
];
|
|
};
|
|
vdirsyncer = {
|
|
enable = lib.mkDefault true;
|
|
collections = [ "from a" ];
|
|
metadata = [ "color" ];
|
|
};
|
|
khal = {
|
|
inherit (vdirsyncer) enable;
|
|
type = "discover";
|
|
};
|
|
};
|
|
outlook = let emailConfig = config.accounts.email.accounts.outlook;
|
|
in rec {
|
|
inherit local;
|
|
primary = lib.mkDefault false;
|
|
primaryCollection = "Work";
|
|
remote = {
|
|
inherit (emailConfig) userName passwordCommand;
|
|
type = "caldav";
|
|
url = "http://localhost:1080/users/${remote.userName}/calendar/";
|
|
};
|
|
vdirsyncer = {
|
|
enable = lib.mkDefault emailConfig.mbsync.enable;
|
|
collections = [ "Work" "Network" "Operations" ];
|
|
};
|
|
khal = {
|
|
inherit (vdirsyncer) enable;
|
|
type = "discover";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|