plugins/image: add curlPackage and ueberzugPackage

This commit is contained in:
Austin Horstman 2024-08-30 20:00:57 -05:00
parent 6915b851a2
commit 93b8b75ff3
No known key found for this signature in database
2 changed files with 21 additions and 2 deletions

View file

@ -22,6 +22,14 @@ in
];
};
curlPackage = lib.mkPackageOption pkgs "curl" {
nullable = true;
};
ueberzugPackage = lib.mkPackageOption pkgs "ueberzug" {
nullable = true;
};
backend =
helpers.defaultNullOpts.mkEnumFirstDefault
[
@ -125,8 +133,8 @@ in
extraPackages = [
# In theory, we could remove that if the user explicitly disables `downloadRemoteImages` for
# all integrations but shipping `curl` is not too heavy.
pkgs.curl
] ++ optional (cfg.backend == "ueberzug") pkgs.ueberzugpp;
cfg.curlPackage
] ++ optional (cfg.backend == "ueberzug") cfg.ueberzugPackage;
extraConfigLua =
let