about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/pkgs/scripts.nix')
-rw-r--r--hm/soispha/pkgs/scripts.nix97
1 files changed, 97 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
new file mode 100644
index 00000000..544975c5
--- /dev/null
+++ b/hm/soispha/pkgs/scripts.nix
@@ -0,0 +1,97 @@
+{
+  pkgs,
+  sysLib,
+  ...
+}: 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
+  };
+  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;};
+  };
+
+  backsnap-scr = write_script {
+    name = "backsnap";
+    path = "wrappers";
+    dependencies = builtins.attrValues {}; # TODO: add snap-sync
+  };
+  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
+  screen_shot-scr
+  mocs-scr
+  update-sys-scr
+  backsnap-scr
+  ll-scr
+  # llp-scr # TODO: see above
+  spodi-scr
+  virsh-del-scr
+  yti-scr
+]