2025-05-14 22:46:00 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
name = "todos";
|
2025-07-09 08:00:00 +01:00
|
|
|
cfg = config.features.cli.${name};
|
2025-05-14 22:46:00 +01:00
|
|
|
|
|
|
|
inherit (lib) mkOption types;
|
|
|
|
in
|
|
|
|
{
|
2025-07-09 08:00:00 +01:00
|
|
|
options.features.cli.${name} = {
|
2025-05-14 22:46:00 +01:00
|
|
|
enable = lib.mkEnableOption "Enable ${name}";
|
|
|
|
|
|
|
|
directory = mkOption {
|
|
|
|
default = "${config.xdg.userDirs.documents}/todos";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home = {
|
|
|
|
packages = with pkgs; [
|
|
|
|
todos-add
|
|
|
|
todos-edit
|
|
|
|
];
|
|
|
|
|
|
|
|
sessionVariables = {
|
|
|
|
TODOS_DIRECTORY = cfg.directory;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|