summary refs log tree commit diff stats
path: root/user/settings/fish.nix
blob: 6ddbe120ef22bdbb4003f98c12a558c9d3c5b397 (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
{ pkgs
, ...
}: {
  programs.fish = {
    enable = true;
    plugins = [
      {
        name = "tide";
        src = pkgs.fetchFromGitHub {
          # https://github.com/IlanCosman/tide
          owner = "IlanCosman";
          repo = "tide";
          rev = "a3426e157f94b8a9cb5bcf96946b1e55625a1948";
          sha256 = "1fwqmsrd6bpf67rgj6f362abjmpk6q8yynyskc4niwg3g15diqq5";
        };
      }
      {
        name = "ghq";
        src = pkgs.fetchFromGitHub {
          owner = "decors";
          repo = "fish-ghq";
          rev = "cafaaabe63c124bf0714f89ec715cfe9ece87fa2";
          sha256 = "0cv7jpvdfdha4hrnjr887jv1pc6vcrxv2ahy7z6x562y7fd77gg9";
        };
      }
    ];
    interactiveShellInit = ''
      bind \es __ghq_repository_search
    '';
    functions = {
      ds = "du -hd1 $argv[1] | sort -h";
    };
  };
  xdg.configFile."fish/functions" = {
    recursive = true;
    source = ./fish/functions;
  };
}