2025-04-23 14:19:05 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
2025-05-03 16:50:27 +01:00
|
|
|
cfg = config.cli.notes;
|
2025-04-23 14:19:05 +01:00
|
|
|
in
|
|
|
|
{
|
2025-05-06 12:00:00 +01:00
|
|
|
options.cli.notes = {
|
|
|
|
enable = mkEnableOption "Enable notes";
|
|
|
|
|
|
|
|
directory = mkOption {
|
|
|
|
default = "${config.xdg.userDirs.documents}/notes";
|
|
|
|
type = types.str;
|
|
|
|
};
|
|
|
|
};
|
2025-04-23 14:19:05 +01:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
xdg = {
|
|
|
|
enable = true;
|
|
|
|
userDirs.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
home = {
|
|
|
|
packages = with pkgs; [ notes ];
|
|
|
|
|
|
|
|
sessionVariables = {
|
2025-05-06 12:00:00 +01:00
|
|
|
NOTES_DIRECTORY = cfg.directory;
|
2025-04-23 14:19:05 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|