about summary refs log tree commit diff stats
path: root/modules/by-name/lf
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/lf')
-rw-r--r--modules/by-name/lf/lf/ctpv/default.nix11
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/default.nix5
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/by-name/lf/lf/ctpv/default.nix b/modules/by-name/lf/lf/ctpv/default.nix
index 2c8743d9..a7d6927a 100644
--- a/modules/by-name/lf/lf/ctpv/default.nix
+++ b/modules/by-name/lf/lf/ctpv/default.nix
@@ -151,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/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";
       };