Files
nixos-config/home/programs/zk.nix
Elias Schröter e5347f74f8 rework services & alacritty
move back to alacritty and install various services
2026-03-18 15:39:27 +01:00

44 lines
1.1 KiB
Nix

{ ... }:
{
programs.zk = {
enable = true;
settings = {
note.template = "default.md";
format.markdow = {
hashtags = true;
colon-tags = false;
multiword-tags = false;
};
tool.fzf-preview = "bat -p --color always {-1}";
notebook = {
dir = "~/zettelkasten"; # TODO: change location to Nextcloud
};
alias = {
n = "zk new inbox/$@";
i = "zk edit -x inbox,journals -i";
ls = "zk list -x inbox,journals $@";
ed = "zk edit -x inbox,journals $@";
rm = ''zk list --interactive --quiet --format "{{abs-path}}" --delimiter0 $@ | xargs -0 rm -vf --'';
recent = "zk edit --sort created- --created-after 'last two weeks' --interactive";
inbox = "zk edit -t inbox --interactive";
};
};
};
home.file = {
"zettelkasten/.zk/templates/default.md" = {
text = ''
---
title: {{ title }}
date: {{format-date now "long"}}
tags: [inbox]
---
# {{ title }}
{{ content }}
'';
};
};
}