mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-07 17:41:03 +01:00
khard: add option to contact module for khard dir
Add an extra option,
accounts.contact.accounts.<name>.khard.defaultCollection
to hardcode a subdirectory for khard to function as intended. Khard
expects to be given a collection directory directly, from which there
can be multiple of in a vdir. This contrasts khal or vdirsyncer which
support recursive search.
Fixes #4531
This commit is contained in:
parent
90ae324e2c
commit
a38f88045e
4 changed files with 44 additions and 2 deletions
|
|
@ -2,4 +2,5 @@
|
|||
khard_empty_config = ./empty_config.nix;
|
||||
khard_basic_config = ./basic_config.nix;
|
||||
khard_multiple_accounts = ./multiple_accounts.nix;
|
||||
khard_dirty_path = ./dirty_path.nix;
|
||||
}
|
||||
|
|
|
|||
22
tests/modules/programs/khard/dirty_path.nix
Normal file
22
tests/modules/programs/khard/dirty_path.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
accounts.contact = {
|
||||
basePath = "/home/user/who/likes///";
|
||||
accounts.forward = {
|
||||
local.type = "filesystem";
|
||||
khard = {
|
||||
enable = true;
|
||||
defaultCollection = "////slashes//a/lot";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.khard.enable = true;
|
||||
|
||||
test.stubs.khard = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/khard/khard.conf \
|
||||
${./dirty_path_expected}
|
||||
'';
|
||||
}
|
||||
8
tests/modules/programs/khard/dirty_path_expected
Normal file
8
tests/modules/programs/khard/dirty_path_expected
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[addressbooks]
|
||||
[[forward]]
|
||||
path = /home/user/who/likes/forward/slashes/a/lot
|
||||
|
||||
|
||||
[general]
|
||||
default_action=list
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue