nixos/home/accounts/calendar.nix

86 lines
2.3 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
{
2023-09-26 10:02:40 +01:00
programs = {
vdirsyncer.enable = true;
khal.enable = true;
};
2023-10-01 09:17:45 +01:00
services.vdirsyncer.enable = true;
accounts.calendar = {
basePath = ".calendar";
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";
remote = {
type = "caldav";
url = "https://cloud.xenia.me.uk/remote.php/dav";
userName = "xenia";
passwordCommand = [
"${pkgs.libsecret}/bin/secret-tool"
"lookup"
"url"
2023-09-30 10:10:32 +01:00
"cloud.xenia.me.uk"
];
};
vdirsyncer = {
2023-10-02 18:10:48 +01:00
enable = lib.mkDefault true;
collections = [ "from a" ];
metadata = [ "color" "displayname" ];
};
2023-09-26 10:02:40 +01:00
khal = {
inherit (vdirsyncer) enable;
2023-10-10 18:55:45 +01:00
color = "dark magenta";
2023-09-26 10:02:40 +01:00
type = "discover";
};
};
ukaea = let emailConfig = config.accounts.email.accounts.ukaea;
in rec {
inherit local;
primary = lib.mkDefault false;
primaryCollection = "Work";
remote = rec {
inherit (emailConfig) userName passwordCommand;
type = "caldav";
url = "http://localhost:1080/users/${userName}/calendar/";
};
2023-10-02 18:10:48 +01:00
vdirsyncer = {
enable = lib.mkDefault emailConfig.mbsync.enable;
collections = [ "Work" ];
2023-10-02 18:10:48 +01:00
metadata = [ "color" "displayname" ];
itemTypes = [ "VEVENT" ];
};
khal = {
inherit (vdirsyncer) enable;
2023-10-10 18:55:45 +01:00
color = "dark cyan";
2023-10-02 18:10:48 +01:00
type = "discover";
};
};
outlook = rec {
inherit local;
remote = {
type = "http";
url =
"https://outlook.office365.com/owa/calendar/57fac11ebefa4d76936bb57c58cea2c0@ukaea.uk/f00cf5046175418c881b15ae1734d35f4235780993826029606/S-1-8-4280276996-1465607807-3846002500-2142210095/reachcalendar.ics";
};
vdirsyncer = {
enable = true;
collections = null;
};
khal = {
inherit (vdirsyncer) enable;
color = "dark blue";
type = "calendar";
readOnly = true;
};
};
};
};
}