forked from lordkekz/nix-yazi-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule.nix
31 lines (30 loc) · 781 Bytes
/
module.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
pkgs,
lib,
config,
...
}:
let
inherit (lib) mkEnableOption mkOption;
inherit (lib.types) lines;
cfg = config.programs.yazi.yaziPlugins;
in
{
options.programs.yazi.yaziPlugins = {
enable = mkEnableOption "yaziPlugins";
runtimeDeps = mkOption {
type = lib.types.listOf (lib.types.either lib.types.package lib.types.str);
description = ''
Additional runtime packages to make available for yazi and plugins.
To deactivate overlaying set this to `lib.mkForce []`.
This gets set by some plugin modules.
'';
default = [ ];
};
};
config = lib.mkIf (cfg.runtimeDeps != [ ]) {
programs.yazi.package = pkgs.yazi.override {
extraPackages = config.programs.yazi.yaziPlugins.runtimeDeps;
};
};
}