zaphyra's git: nixfiles

zaphyra's nixfiles

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 
50 
51 
52 
53 
54 
{
  lib,
  pkgs,
  config,
  ...
}:

{

  options.zpha.programs.broot.enable = lib.mkEnableOption "broot";

  config = lib.mkIf config.zpha.programs.broot.enable {
    users.users.zaphyra.maid = {
      packages = [ pkgs.broot ];

      file.xdg_config = {
        "broot/conf.hjson".text = builtins.toJSON {
          verbs = [
            {
              invocation = "edit";
              shortcut = "e";
              key = "enter";
              apply_to = "text_file";
              external = "$EDITOR {file:space-separated}";
              leave_broot = false;
            }
            {
              invocation = "create {subpath}";
              execution = "$EDITOR {directory}/{subpath}";
              leave_broot = false;
            }
            {
              invocation = "git_diff";
              shortcut = "gd";
              leave_broot = false;
              execution = "git difftool -y {file}";
            }
            {
              key = "alt-pagedown";
              internal = "page_down";
              impacted_panel = "right";
            }
            {
              key = "alt-pageup";
              internal = "page_up";
              impacted_panel = "right";
            }
          ];
        };
      };
    };
  };

}