zk: add module

This commit is contained in:
Silmar 2023-09-11 15:50:12 -03:00 committed by Robert Helgesson
parent 8b07ca5419
commit b550d074fb
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
8 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1 @@
{ zk = ./zk.nix; }

View 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"

View 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}
'';
}