mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-16 14:01:08 +01:00
tests/pimsync: init
This commit is contained in:
parent
f4411d1e9b
commit
2b0a46285b
3 changed files with 73 additions and 0 deletions
39
tests/modules/programs/pimsync/basic.nix
Normal file
39
tests/modules/programs/pimsync/basic.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
accounts.calendar = {
|
||||||
|
accounts.caldav = {
|
||||||
|
pimsync.enable = true;
|
||||||
|
remote = {
|
||||||
|
passwordCommand = [
|
||||||
|
"pass"
|
||||||
|
"caldav"
|
||||||
|
];
|
||||||
|
type = "caldav";
|
||||||
|
url = "https://caldav.example.com";
|
||||||
|
userName = "alice";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
accounts.http = {
|
||||||
|
pimsync.enable = true;
|
||||||
|
remote = {
|
||||||
|
type = "http";
|
||||||
|
url = "https://example.com/calendar";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
basePath = ".local/state/calendar";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.pimsync = {
|
||||||
|
enable = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
name = "status_path";
|
||||||
|
params = [ "/test/dir" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nmt.script = ''
|
||||||
|
assertFileExists home-files/.config/pimsync/pimsync.conf
|
||||||
|
assertFileContent home-files/.config/pimsync/pimsync.conf ${./basic.scfg}
|
||||||
|
'';
|
||||||
|
}
|
||||||
31
tests/modules/programs/pimsync/basic.scfg
Normal file
31
tests/modules/programs/pimsync/basic.scfg
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
storage caldav-local {
|
||||||
|
fileext .ics
|
||||||
|
path /home/hm-user/.local/state/calendar/caldav
|
||||||
|
type vdir/icalendar
|
||||||
|
}
|
||||||
|
storage http-local {
|
||||||
|
fileext .ics
|
||||||
|
path /home/hm-user/.local/state/calendar/http
|
||||||
|
type vdir/icalendar
|
||||||
|
}
|
||||||
|
storage caldav-remote {
|
||||||
|
type caldav
|
||||||
|
url https://caldav.example.com
|
||||||
|
username alice
|
||||||
|
password {
|
||||||
|
cmd pass caldav
|
||||||
|
}
|
||||||
|
}
|
||||||
|
storage http-remote {
|
||||||
|
type webcal
|
||||||
|
url https://example.com/calendar
|
||||||
|
}
|
||||||
|
pair calendar-caldav {
|
||||||
|
storage_a caldav-local
|
||||||
|
storage_b caldav-remote
|
||||||
|
}
|
||||||
|
pair calendar-http {
|
||||||
|
storage_a http-local
|
||||||
|
storage_b http-remote
|
||||||
|
}
|
||||||
|
status_path /test/dir
|
||||||
3
tests/modules/programs/pimsync/default.nix
Normal file
3
tests/modules/programs/pimsync/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
pimsync-basic = ./basic.nix;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue