Files
nix/home/modules/zk/default.nix
T
2026-08-23 13:56:53 +02:00

37 lines
629 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.zk;
in
{
options.zk = {
enable = lib.mkEnableOption "zettelkasten";
path = lib.mkOption {
type = lib.types.str;
default = "${config.home.homeDirectory}/.zk";
};
};
config = lib.mkIf cfg.enable {
home = {
sessionVariables.ZK_PATH = cfg.path;
packages = [
(pkgs.writeShellApplication {
name = "zk";
runtimeInputs = with pkgs; [
tmux
gh
];
runtimeEnv.ZK_PATH = cfg.path;
text = builtins.readFile ./scripts/zk.sh;
})
];
};
};
}