main
1{
2 den.aspects.develop.yazi = {
3 homeManager = {pkgs, ...}: let
4 auto-layout = pkgs.yaziPlugins.mkYaziPlugin {
5 pname = "auto-layout.yazi";
6 version = "unstable-25-07-30";
7 src = pkgs.fetchFromGitHub {
8 owner = "luccahuguet";
9 repo = "auto-layout.yazi";
10 rev = "e24bee9f6dd15ff80eae1b3dc1a6b06ee7e66121";
11 hash = "sha256-4vRIGU/ArXhW9ervhyNhpfDN7UF4pqVYnxi6FExlgGk=";
12 };
13 meta = {
14 description = "Automatically change the column layout in yazi based on available window width";
15 homepage = "https://github.com/luccahuguet/auto-layout.yazi";
16 license = pkgs.lib.licenses.mit;
17 };
18 };
19 in {
20 programs.yazi = {
21 enable = true;
22 enableBashIntegration = true;
23 enableFishIntegration = true;
24 shellWrapperName = "yy";
25 plugins = {
26 git = pkgs.yaziPlugins.git;
27 auto-layout = auto-layout;
28 };
29 initLua = ''
30 require("git"):setup()
31 require("auto-layout").setup()
32 '';
33 settings = {
34 mgr = {
35 show_hidden = true;
36 sort_dir_first = true;
37 };
38 plugin.prepend_fetchers = [
39 {
40 url = "*";
41 run = "git";
42 group = "git";
43 }
44 {
45 url = "*/";
46 run = "git";
47 group = "git";
48 }
49 ];
50 };
51 };
52 };
53 };
54
55 den.aspects.develop.yazi.themes = {
56 catppuccin = {
57 homeManager = {pkgs, ...}: let
58 catppuccin-yazi = pkgs.fetchurl {
59 url = "https://github.com/catppuccin/yazi/raw/baaf5d1c9427b836fbefd126aa855f9eab7a9d0d/themes/mocha/catppuccin-mocha-mauve.toml";
60 hash = "sha256-MaVO1ZSjxqULH00NoY9J6hEOw9QQA2vV6saN17WF9yE=";
61 };
62 catppuccin-syntax = pkgs.fetchurl {
63 name = "Catppuccin-Mocha.tmTheme";
64 url = "https://github.com/catppuccin/bat/raw/6810349b28055dce54076712fc05fc68da4b8ec0/themes/Catppuccin%20Mocha.tmTheme";
65 hash = "sha256-OVVm8IzrMBuTa5HAd2kO+U9662UbEhVT8gHJnCvUqnc=";
66 };
67 in {
68 xdg.configFile = {
69 "yazi/theme.toml".source = catppuccin-yazi;
70 "yazi/Catppuccin-mocha.tmTheme".source = catppuccin-syntax;
71 };
72 };
73 };
74 };
75}