about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts.nix
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-28 18:34:19 +0100
committerSoispha <soispha@vhack.eu>2023-12-28 19:20:55 +0100
commit727f17e7e4c59b4342fbca80d5dbdd379c4a3f52 (patch)
treec2a529cb3689f2317c42fcc78c9b85d9218f6bfa /hm/soispha/pkgs/scripts.nix
parentfix(sys/svcs/xdg/termfilechooser): Remove as river does not support it (diff)
downloadnixos-config-727f17e7e4c59b4342fbca80d5dbdd379c4a3f52.zip
fix(hm/pkgs/src/neorg): Move to script as completion generation function
Diffstat (limited to 'hm/soispha/pkgs/scripts.nix')
-rw-r--r--hm/soispha/pkgs/scripts.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index 0c58d83a..8e98bccb 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -71,7 +71,7 @@
   };
   neorg-scr = sysLib.writeShellScriptWithLibraryAndKeepPath {
     name = "neorg";
-    src = ./scripts/wrappers/neorg;
+    src = ./scripts/wrappers/neorg/neorg;
     dependencies = with pkgs; [
       cocogitto
       git-crypt
@@ -87,10 +87,15 @@
       ALL_PROJECTS_COMMA = "${config.soispha.taskwarrior.projects.projects_comma}";
       ALL_PROJECTS_PIPE = "${config.soispha.taskwarrior.projects.projects_pipe}";
       ALL_WORKSPACES = "${lib.strings.concatStringsSep "|" (builtins.attrNames config.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces)}";
-      ID_GENERATION_FUNCTION =
-        # It's just impossible to correctly quote this function when it's in any language that
-        # has special treatment for backslashes
-        ./scripts/wrappers/neorg_id_completion_function;
+      ID_GENERATION_FUNCTION = "${sysLib.writeShellScriptWithLibrary {
+        name = "neorg_id_function";
+        src = ./scripts/wrappers/neorg/neorg_id_function.sh;
+        dependencies = with pkgs; [
+          taskwarrior
+          gawk
+          findutils # 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";