blob: 30336744431b0b12dfca097db4fcab9e5f23be70 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# yazi - Terminal file manager with native previews
{ config, lib, ... }:
{
imports = [
./theme.nix
./assertions.nix
];
options.file-management.yazi = {
enable = lib.mkEnableOption "Enables yazi.";
package = lib.mkOption {
type = lib.types.package;
default = config.programs.yazi.finalPackage;
defaultText = lib.literalExpression "config.programs.yazi.finalPackage";
description = "The yazi package to use. Defaults to the wrapped finalPackage from programs.yazi.";
};
};
config = lib.mkIf config.file-management.yazi.enable {
programs.yazi = {
enable = true;
shellWrapperName = "yy";
enableZshIntegration = config.terminal.zsh.enable;
settings = {
mgr = {
show_hidden = true;
};
};
};
home.file.".local/share/icons/hicolor/scalable/apps/yazi.png" = {
source = ../../../assets/icons/yazi.png;
};
xdg.desktopEntries."yazi" = {
name = "Yazi";
exec = "${lib.getExe config.terminal.kitty.package} --class yazi -e ${lib.getExe config.file-management.yazi.package}";
icon = "yazi";
categories = [ "Utility" ];
comment = "Terminal file manager";
terminal = false;
type = "Application";
};
xdg.mimeApps.defaultApplications = {
"inode/directory" = "yazi.desktop";
};
};
}
|