{ lib, sysLib, # dependencies cocogitto, rofi, libnotify, taskwarrior, gawk, findutils, # config defaultNeorgProjectDir ? "/no-default-dir", # homeConfig.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces.projects allProjectsNewline ? "", # homeConfig.soispha.taskwarrior.projects.projects_newline allProjectsComma ? "", # homeConfig.soispha.taskwarrior.projects.projects_comma allProjectsPipe ? "", # homeConfig.soispha.taskwarrior.projects.projects_pipe allWorkspaces ? {}, # homeConfig.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces xdgConfigHome ? builtins.getEnv "XDG_CONFIG_HOME", xdgDataHome ? builtins.getEnv "XDG_DATA_HOME", }: sysLib.writeShellScriptMultiPart { name = "neorg"; src = ./.; generateCompletions = true; keepPath = true; baseName = "main.sh"; cmdPrefix = "functions"; cmdNames = [ "add.sh" "context.sh" "dmenu.sh" "f_start.sh" "f_stop.sh" "list.sh" "project.sh" "review.sh" "utils.sh" "workspace.sh" ]; dependencies = [ cocogitto rofi libnotify ]; replacementStrings = { DEFAULT_NEORG_PROJECT_DIR = defaultNeorgProjectDir; HOME_TASKRC = "${xdgConfigHome}/task/home-manager-taskrc"; NEORG_REVIEW_PATH = "${xdgDataHome}/neorg/review"; ALL_PROJECTS_NEWLINE = allProjectsNewline; ALL_PROJECTS_COMMA = allProjectsComma; ALL_PROJECTS_PIPE = allProjectsPipe; ALL_WORKSPACES = "${lib.strings.concatStringsSep "|" (builtins.attrNames allWorkspaces)}"; ID_GENERATION_FUNCTION = "${sysLib.writeShellScript { name = "neorg_id_function"; src = ./neorg_id_function.sh; dependencies = [ taskwarrior gawk findutils # source of xargs ]; }}/bin/neorg_id_function"; # TODO: Replace the hard-coded path here with some reference <2023-10-20> TASK_PROJECT_FILE = "/home/soispha/repos/nix/nixos-config/hm/soispha/conf/taskwarrior/projects/default.nix"; }; }