aboutsummaryrefslogtreecommitdiff
path: root/modules/homeModules/fish.nix
blob: 1876da51f508a7e693fca2c53d76a72bb40f16e6 (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
{inputs, ...}: {
  flake.homeModules.fish = {
    pkgs,
    config,
    lib,
    ...
  }: {
    options.customs = {
      fish.enable = lib.mkEnableOption "enable fish";
    };
    config = lib.mkIf config.customs.fish.enable {
      programs.direnv = {
        enable = true;
        nix-direnv.enable = true;
      };

      programs.nix-index.enableFishIntegration = true;

      programs.fish = {
        enable = true;
        plugins = [
          {
            name = "pure";
            src = pkgs.fishPlugins.pure.src;
          }
          {
            name = "autopair";
            src = pkgs.fishPlugins.autopair.src;
          }
        ];
        interactiveShellInit = ''
          set fish_greeting
          pokemon-colorscripts -r --no-title
        '';

        shellAliases = {
          ls = "ls --hyperlink=auto --color=auto";
        };
      };
    };
  };
}