mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-13 11:19:27 +08:00
pimsync: ensure local storage directories exist Unfortunately pipsync will throw an error if it trys to write into a nonexistant local storage directory. This patch ensures that all local storage directories are present for accounts with pimsync enabled. * pimsync: use tmpfiles to create storage dirs * pimsync: fix tests * pimsync: only use tmpfiles on linux * pimsync: format * pimsync: use mkdir to create storage dirs if systemd is not available
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
accounts.calendar = {
|
|
accounts.mine = {
|
|
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";
|
|
};
|
|
|
|
accounts.contact = {
|
|
accounts.mine = {
|
|
pimsync.enable = true;
|
|
remote = {
|
|
passwordCommand = [
|
|
"pass"
|
|
"carddav"
|
|
];
|
|
type = "carddav";
|
|
url = "https://carddav.example.com";
|
|
userName = "bob";
|
|
};
|
|
};
|
|
basePath = ".local/state/contact";
|
|
};
|
|
|
|
programs.pimsync = {
|
|
enable = true;
|
|
settings = [
|
|
{
|
|
name = "status_path";
|
|
params = [ "/test/dir" ];
|
|
}
|
|
];
|
|
};
|
|
|
|
test.stubs.systemd.outPath = null;
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/pimsync/pimsync.conf
|
|
assertFileContent home-files/.config/pimsync/pimsync.conf ${./basic.scfg}
|
|
'';
|
|
}
|