{ pkgs, sysLib, config, ... }: let write_script = { name, path, dependencies, }: sysLib.writeShellScriptWithLibrary { inherit name; src = ./scripts/${path}/${name}; dependencies = dependencies ++ [pkgs.dash]; }; aumo-scr = write_script { name = "aumo"; path = "apps"; dependencies = builtins.attrValues {inherit (pkgs) udisks gawk gnused gnugrep sudo;}; }; con2pdf-scr = write_script { name = "con2pdf"; path = "apps"; dependencies = builtins.attrValues {inherit (pkgs) sane-backends imagemagick coreutils fd;}; }; dldragon-scr = write_script { name = "dldragon"; path = "small_functions"; dependencies = builtins.attrValues {inherit (pkgs) curl xdragon;}; }; gtk-themes-scr = write_script { name = "gtk-themes"; path = "small_functions"; dependencies = builtins.attrValues {inherit (pkgs) glib;}; }; screen_shot-scr = write_script { name = "screen_shot"; path = "small_functions"; dependencies = builtins.attrValues {inherit (pkgs) grim slurp alacritty;}; # TODO: add llp }; mocs-scr = write_script { name = "mocs"; path = "small_functions"; dependencies = builtins.attrValues {inherit (pkgs) ncmpc procps;}; # TODO: add mymocp }; neorg-scr = sysLib.writeShellScriptWithLibraryAndKeepPath { name = "neorg"; src = ./scripts/wrappers/neorg; dependencies = []; replacementStrings = { DEFAULT_NEORG_PROJECT_DIR = config.programs.nixvim.plugins.neorg.modules."core.dirman".config.workspaces.projects; HOME_TASKRC = "${config.xdg.configHome}/task/home-manager-taskrc"; ALL_PROJECTS_NEWLINE = "${config.soispha.taskwarrior.projects.projects_newline}"; ALL_PROJECTS_COMMA = "${config.soispha.taskwarrior.projects.projects_comma}"; # 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"; }; }; update-sys-scr = write_script { name = "update-sys"; path = "small_functions"; dependencies = builtins.attrValues {inherit (pkgs) git git-crypt nixos-rebuild sudo openssh coreutils mktemp gnugrep gnused;}; }; ll-scr = sysLib.writeShellScriptWithLibraryUnwrapped { name = "ll"; src = ./scripts/wrappers/ll; }; # TODO: this need to be replaced with a wayland alternative # llp-scr = write_script { # name = "llp"; # path = "wrappers"; # dependencies = builtins.attrValues {inherit (pkgs) lf ueberzug;}; # }; spodi-scr = write_script { name = "spodi"; path = "wrappers"; dependencies = builtins.attrValues {inherit (pkgs) gawk expect spotdl fd coreutils;}; }; virsh-del-scr = write_script { name = "virsh-del"; path = "wrappers"; dependencies = builtins.attrValues {inherit (pkgs) libvirt;}; }; yti-scr = write_script { name = "yti"; path = "wrappers"; dependencies = builtins.attrValues {inherit (pkgs) gawk expect yt-dlp;}; }; in [ aumo-scr con2pdf-scr dldragon-scr gtk-themes-scr ll-scr # llp-scr # TODO: see above mocs-scr neorg-scr screen_shot-scr spodi-scr update-sys-scr virsh-del-scr yti-scr ]