about summary refs log tree commit diff stats
path: root/pkgs/by-name/ne
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
commit204731c0a69136c9cebcb54f1afecf5145e26bbe (patch)
treefc9132e5dc74e4a8e1327cdd411839a90f9410aa /pkgs/by-name/ne
parentrefactor(sys): Modularize and move to `modules/system` or `pkgs` (diff)
downloadnixos-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 '')
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/add.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/context.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/dmenu.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/f_start.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/f_stop.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/list.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/project.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/review.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/utils.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/functions/workspace.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/main.sh (renamed from pkgs/sources/scripts/source/specific/neorg/sh/main.sh)0
-rwxr-xr-xpkgs/by-name/ne/neorg/neorg_id_function.sh (renamed from pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh)0
-rw-r--r--pkgs/by-name/ne/neorg/package.nix69
13 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh b/pkgs/by-name/ne/neorg/functions/add.sh
index 5a830a10..5a830a10 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/add.sh
+++ b/pkgs/by-name/ne/neorg/functions/add.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh b/pkgs/by-name/ne/neorg/functions/context.sh
index 7095847d..7095847d 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/context.sh
+++ b/pkgs/by-name/ne/neorg/functions/context.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh b/pkgs/by-name/ne/neorg/functions/dmenu.sh
index 5a138982..5a138982 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/dmenu.sh
+++ b/pkgs/by-name/ne/neorg/functions/dmenu.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh b/pkgs/by-name/ne/neorg/functions/f_start.sh
index 2423dd44..2423dd44 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_start.sh
+++ b/pkgs/by-name/ne/neorg/functions/f_start.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh b/pkgs/by-name/ne/neorg/functions/f_stop.sh
index e4ff0b94..e4ff0b94 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/f_stop.sh
+++ b/pkgs/by-name/ne/neorg/functions/f_stop.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh b/pkgs/by-name/ne/neorg/functions/list.sh
index 10659457..10659457 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/list.sh
+++ b/pkgs/by-name/ne/neorg/functions/list.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh b/pkgs/by-name/ne/neorg/functions/project.sh
index 64591850..64591850 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/project.sh
+++ b/pkgs/by-name/ne/neorg/functions/project.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh b/pkgs/by-name/ne/neorg/functions/review.sh
index a0a9ab8d..a0a9ab8d 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/review.sh
+++ b/pkgs/by-name/ne/neorg/functions/review.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh b/pkgs/by-name/ne/neorg/functions/utils.sh
index c3843e8e..c3843e8e 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/utils.sh
+++ b/pkgs/by-name/ne/neorg/functions/utils.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh b/pkgs/by-name/ne/neorg/functions/workspace.sh
index d5eb2fca..d5eb2fca 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/functions/workspace.sh
+++ b/pkgs/by-name/ne/neorg/functions/workspace.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/sh/main.sh b/pkgs/by-name/ne/neorg/main.sh
index 559351b9..559351b9 100755
--- a/pkgs/sources/scripts/source/specific/neorg/sh/main.sh
+++ b/pkgs/by-name/ne/neorg/main.sh
diff --git a/pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh b/pkgs/by-name/ne/neorg/neorg_id_function.sh
index 865ecacf..865ecacf 100755
--- a/pkgs/sources/scripts/source/specific/neorg/neorg_id_function.sh
+++ b/pkgs/by-name/ne/neorg/neorg_id_function.sh
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";
+  };
+}