2023-07-04 12:14:47 +02:00
|
|
|
{ ... }:
|
|
|
|
|
|
|
|
{
|
2023-08-30 11:57:47 +02:00
|
|
|
programs.khal = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
default.timedelta = "5d";
|
|
|
|
view.agenda_event_format =
|
|
|
|
"{calendar-color}{cancelled}{start-end-time-style} {title}{repeat-symbol}{reset}";
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2023-07-04 12:14:47 +02:00
|
|
|
accounts.calendar = {
|
|
|
|
basePath = "$XDG_CONFIG_HOME/cal";
|
|
|
|
accounts = {
|
|
|
|
test = {
|
|
|
|
primary = true;
|
|
|
|
primaryCollection = "test";
|
|
|
|
khal = {
|
|
|
|
enable = true;
|
|
|
|
readOnly = true;
|
2024-03-31 22:06:56 +02:00
|
|
|
color = "#ff0000";
|
2023-07-04 12:14:47 +02:00
|
|
|
type = "calendar";
|
|
|
|
};
|
|
|
|
local.type = "filesystem";
|
|
|
|
local.fileExt = ".ics";
|
|
|
|
name = "test";
|
|
|
|
remote = {
|
|
|
|
type = "http";
|
2024-04-05 13:48:20 +02:00
|
|
|
url = "https://example.com/events.ical";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testWithAddresss = {
|
|
|
|
khal = {
|
|
|
|
enable = true;
|
|
|
|
addresses = [ "john.doe@email.com" ];
|
|
|
|
};
|
|
|
|
local = {
|
|
|
|
type = "filesystem";
|
|
|
|
fileExt = ".ics";
|
|
|
|
};
|
|
|
|
remote = {
|
|
|
|
type = "http";
|
|
|
|
url = "https://example.com/events.ical";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
testWithMultipleAddresss = {
|
|
|
|
khal = {
|
|
|
|
enable = true;
|
|
|
|
addresses = [ "john.doe@email.com" "another.brick@on.the.wall" ];
|
|
|
|
};
|
|
|
|
local = {
|
|
|
|
type = "filesystem";
|
|
|
|
fileExt = ".ics";
|
|
|
|
};
|
|
|
|
remote = {
|
|
|
|
type = "http";
|
2023-07-04 12:14:47 +02:00
|
|
|
url = "https://example.com/events.ical";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-03 18:12:42 +01:00
|
|
|
accounts.contact = {
|
|
|
|
basePath = "$XDG_CONFIG_HOME/card";
|
|
|
|
accounts = {
|
|
|
|
testcontacts = {
|
|
|
|
khal = {
|
|
|
|
enable = true;
|
|
|
|
collections = [ "default" "automaticallyCollected" ];
|
|
|
|
};
|
|
|
|
local.type = "filesystem";
|
|
|
|
local.fileExt = ".vcf";
|
|
|
|
name = "testcontacts";
|
|
|
|
remote = {
|
|
|
|
type = "http";
|
|
|
|
url = "https://example.com/contacts.vcf";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
testcontactsNoCollections = {
|
|
|
|
khal.enable = true;
|
|
|
|
local.type = "filesystem";
|
|
|
|
local.fileExt = ".vcf";
|
|
|
|
name = "testcontactsNoCollections";
|
|
|
|
remote = {
|
|
|
|
type = "http";
|
|
|
|
url = "https://example.com/contacts.vcf";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-07-04 12:14:47 +02:00
|
|
|
test.stubs = { khal = { }; };
|
|
|
|
|
|
|
|
nmt.script = ''
|
2023-08-30 11:57:47 +02:00
|
|
|
configFile=home-files/.config/khal/config
|
|
|
|
assertFileExists $configFile
|
|
|
|
assertFileContent $configFile ${./khal-config-expected}
|
2023-07-04 12:14:47 +02:00
|
|
|
'';
|
|
|
|
}
|