mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/image: add curlPackage and ueberzugPackage
This commit is contained in:
parent
6915b851a2
commit
93b8b75ff3
2 changed files with 21 additions and 2 deletions
|
@ -22,6 +22,14 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
curlPackage = lib.mkPackageOption pkgs "curl" {
|
||||||
|
nullable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
ueberzugPackage = lib.mkPackageOption pkgs "ueberzug" {
|
||||||
|
nullable = true;
|
||||||
|
};
|
||||||
|
|
||||||
backend =
|
backend =
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
helpers.defaultNullOpts.mkEnumFirstDefault
|
||||||
[
|
[
|
||||||
|
@ -125,8 +133,8 @@ in
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
# In theory, we could remove that if the user explicitly disables `downloadRemoteImages` for
|
# In theory, we could remove that if the user explicitly disables `downloadRemoteImages` for
|
||||||
# all integrations but shipping `curl` is not too heavy.
|
# all integrations but shipping `curl` is not too heavy.
|
||||||
pkgs.curl
|
cfg.curlPackage
|
||||||
] ++ optional (cfg.backend == "ueberzug") pkgs.ueberzugpp;
|
] ++ optional (cfg.backend == "ueberzug") cfg.ueberzugPackage;
|
||||||
|
|
||||||
extraConfigLua =
|
extraConfigLua =
|
||||||
let
|
let
|
||||||
|
|
|
@ -74,4 +74,15 @@
|
||||||
backend = "ueberzug";
|
backend = "ueberzug";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
no-packages = {
|
||||||
|
test.runNvim = false;
|
||||||
|
|
||||||
|
plugins.image = {
|
||||||
|
enable = true;
|
||||||
|
backend = "kitty";
|
||||||
|
curlPackage = null;
|
||||||
|
ueberzugPackage = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue