zk: add module
This commit is contained in:
parent
8b07ca5419
commit
b550d074fb
8 changed files with 113 additions and 0 deletions
1
tests/modules/programs/zk/default.nix
Normal file
1
tests/modules/programs/zk/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ zk = ./zk.nix; }
|
||||
15
tests/modules/programs/zk/expected.toml
Normal file
15
tests/modules/programs/zk/expected.toml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[extra]
|
||||
author = "Mickaël"
|
||||
|
||||
[note]
|
||||
default-title = "Untitled"
|
||||
extension = "md"
|
||||
filename = "{{id}}-{{slug title}}"
|
||||
id-case = "lower"
|
||||
id-charset = "alphanum"
|
||||
id-length = 4
|
||||
language = "en"
|
||||
template = "default.md"
|
||||
|
||||
[notebook]
|
||||
dir = "~/notebook"
|
||||
30
tests/modules/programs/zk/zk.nix
Normal file
30
tests/modules/programs/zk/zk.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.zk = {
|
||||
enable = true;
|
||||
settings = {
|
||||
extra = { author = "Mickaël"; };
|
||||
|
||||
note = {
|
||||
default-title = "Untitled";
|
||||
extension = "md";
|
||||
filename = "{{id}}-{{slug title}}";
|
||||
id-case = "lower";
|
||||
id-charset = "alphanum";
|
||||
id-length = 4;
|
||||
template = "default.md";
|
||||
language = "en";
|
||||
};
|
||||
|
||||
notebook = { dir = "~/notebook"; };
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.zk = { };
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/zk/config.toml
|
||||
assertFileContent home-files/.config/zk/config.toml ${./expected.toml}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue