From 017651ef4b1f62e4f54d8eff234ab8295234a2fc Mon Sep 17 00:00:00 2001
From: Benedikt Peetz <benedikt.peetz@b-peetz.de>
Date: Sun, 15 Dec 2024 09:56:35 +0100
Subject: fix(modules/lf/ctpv/prev/any): Also provide the `HELPERS`
replacementString
---
modules/by-name/lf/lf/ctpv/default.nix | 11 +++++++++++
modules/by-name/lf/lf/ctpv/prev/default.nix | 5 +++++
2 files changed, 16 insertions(+)
(limited to 'modules/by-name/lf')
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";
};
--
cgit 1.4.1