about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-15 09:56:35 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-15 09:56:35 +0100
commit017651ef4b1f62e4f54d8eff234ab8295234a2fc (patch)
tree5939940e5ba793004c77f91720948275cdf24ecf
parentrefactor(modules/lf/ctpv/prev): Make all implicit dependencies explicit (diff)
downloadnixos-config-017651ef4b1f62e4f54d8eff234ab8295234a2fc.tar.gz
nixos-config-017651ef4b1f62e4f54d8eff234ab8295234a2fc.zip
fix(modules/lf/ctpv/prev/any): Also provide the `HELPERS` replacementString prime
Diffstat (limited to '')
-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";
       };