about summary refs log tree commit diff stats
path: root/modules/by-name
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name')
-rw-r--r--modules/by-name/lf/lf/ctpv/default.nix21
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix2
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix2
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/application/pgp/default.nix1
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/audio/default.nix3
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/default.nix5
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/font/default.nix2
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/image/default.nix3
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/image/svg+xml/default.nix2
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/inode/default.nix4
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/video/default.nix2
11 files changed, 35 insertions, 12 deletions
diff --git a/modules/by-name/lf/lf/ctpv/default.nix b/modules/by-name/lf/lf/ctpv/default.nix
index e89ae453..a7d6927a 100644
--- a/modules/by-name/lf/lf/ctpv/default.nix
+++ b/modules/by-name/lf/lf/ctpv/default.nix
@@ -113,15 +113,7 @@
       };
       dependencies = lib.mkOption {
         type = lib.types.listOf lib.types.package;
-        default = with pkgs; [
-          dash
-          coreutils
-          # Dependencies of the helpers.sh script
-          chafa
-          gnused
-          gnugrep
-          unixtools.script
-        ];
+        default = [];
         description = "The packages to provide to the script";
       };
     };
@@ -159,6 +151,17 @@ in {
       default = config.home-manager.users.soispha.xdg.dataHome;
     };
 
+    # TODO: This is necessary, as the `./prev` dir is imported separately and as such
+    # cannot access the `./helpers.sh` file in it's parent directory.
+    # This separate import should ideally be removed. <2024-12-15>
+    helpers = lib.mkOption {
+      default = ./helpers.sh;
+      type = lib.types.pathInStore;
+
+      internal = true;
+      readOnly = true;
+    };
+
     previewers = lib.mkOption {
       description = ''
         The previewers to add to the config file.
diff --git a/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix
index 33c51352..40510a78 100644
--- a/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/application/epub/default.nix
@@ -8,6 +8,8 @@
       dependencies = with pkgs; [
         bk
         epub-thumbnailer
+        chafa
+        gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix
index b27e3ef9..d3061ea8 100644
--- a/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/application/pdf/default.nix
@@ -6,6 +6,8 @@
       priority = 1;
       dependencies = [
         pkgs.poppler_utils # for `pdftoppm`
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/application/pgp/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/pgp/default.nix
index c219a1ed..32f42783 100644
--- a/modules/by-name/lf/lf/ctpv/prev/application/pgp/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/application/pgp/default.nix
@@ -11,6 +11,7 @@
       priority = 1;
       dependencies = [
         pkgs.sequoia-sq
+        pkgs.unixtools.script
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/audio/default.nix b/modules/by-name/lf/lf/ctpv/prev/audio/default.nix
index 97731daf..0c60e9d5 100644
--- a/modules/by-name/lf/lf/ctpv/prev/audio/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/audio/default.nix
@@ -6,6 +6,9 @@
       dependencies = [
         pkgs.ffmpegthumbnailer
         pkgs.ffmpeg
+
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/default.nix b/modules/by-name/lf/lf/ctpv/prev/default.nix
index 211a20bd..b59430f8 100644
--- a/modules/by-name/lf/lf/ctpv/prev/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/default.nix
@@ -11,6 +11,11 @@ in {
       priority = -1;
       matches.mime = ["*/*"];
       replacementStrings = {
+        # FIXME: This declaration replaces the default (although it should be merged with
+        # the default value.) There must be a way, so that repeating the default values is
+        # not needed. <2024-12-15>
+        HELPERS = cfg.ctpv.helpers;
+
         STORAGE_DIRECTORY = "${cfg.ctpv.xdgDataHome}/ctpv/missing_previews";
       };
 
diff --git a/modules/by-name/lf/lf/ctpv/prev/font/default.nix b/modules/by-name/lf/lf/ctpv/prev/font/default.nix
index f5301008..306e7892 100644
--- a/modules/by-name/lf/lf/ctpv/prev/font/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/font/default.nix
@@ -11,6 +11,8 @@
       ];
       dependencies = [
         pkgs.fontforge # for `fontimage`
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/image/default.nix b/modules/by-name/lf/lf/ctpv/prev/image/default.nix
index 36700fec..87fba00c 100644
--- a/modules/by-name/lf/lf/ctpv/prev/image/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/image/default.nix
@@ -4,7 +4,8 @@
       previewer = ./image.sh;
       matches.mime = ["image/*"];
       dependencies = [
-        # Everything is already in the default dependencies.
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/default.nix b/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/default.nix
index 5b965fd7..90915c84 100644
--- a/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/image/svg+xml/default.nix
@@ -6,6 +6,8 @@
       matches.mime = ["image/svg+xml"];
       dependencies = [
         pkgs.imagemagick
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };
diff --git a/modules/by-name/lf/lf/ctpv/prev/inode/default.nix b/modules/by-name/lf/lf/ctpv/prev/inode/default.nix
index bed0b81a..eaade0f1 100644
--- a/modules/by-name/lf/lf/ctpv/prev/inode/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/inode/default.nix
@@ -1,10 +1,10 @@
-{...}: {
+{pkgs, ...}: {
   soispha.programs.lf.ctpv.previewers = {
     ls = {
       previewer = ./ls.sh;
       priority = 1;
       matches.mime = ["inode/directory"];
-      dependencies = [];
+      dependencies = [pkgs.coreutils];
     };
     symlink = {
       previewer = ./symlink.sh;
diff --git a/modules/by-name/lf/lf/ctpv/prev/video/default.nix b/modules/by-name/lf/lf/ctpv/prev/video/default.nix
index 47749d2c..f38f61c7 100644
--- a/modules/by-name/lf/lf/ctpv/prev/video/default.nix
+++ b/modules/by-name/lf/lf/ctpv/prev/video/default.nix
@@ -5,6 +5,8 @@
       matches.mime = ["video/*"];
       dependencies = [
         pkgs.ffmpegthumbnailer
+        pkgs.chafa
+        pkgs.gnused
       ];
     };
   };