diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-23 13:26:22 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-05-23 13:26:22 +0200 |
commit | 204731c0a69136c9cebcb54f1afecf5145e26bbe (patch) | |
tree | fc9132e5dc74e4a8e1327cdd411839a90f9410aa /pkgs/by-name/ne/neorg/package.nix | |
parent | refactor(sys): Modularize and move to `modules/system` or `pkgs` (diff) | |
download | nixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.tar.gz nixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.zip |
refactor(pkgs): Categorize into `by-name` shards
This might not be the perfect way to organize a package set -- especially if the set is not nearly the size of nixpkgs -- but it is _at_ least a way of organization.
Diffstat (limited to '')
-rw-r--r-- | pkgs/by-name/ne/neorg/package.nix | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/by-name/ne/neorg/package.nix b/pkgs/by-name/ne/neorg/package.nix new file mode 100644 index 00000000..112df35c --- /dev/null +++ b/pkgs/by-name/ne/neorg/package.nix @@ -0,0 +1,69 @@ +{ + 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 = ./source/specific/neorg/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"; + }; +} |