aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/hjem/programs/fish.nix
blob: 2fdc184cb83f86e94f7f55f4588068d12a764370 (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
50
{
  pkgs,
  config,
  lib,
  ...
}: let
  cfg = config.collinux.terminal.shells.fish;
in
  lib.mkIf cfg.enable {
    files = {
      ".config/fish/conf.d/xdg.fish".text =
        # fish
        ''
          set -gx XDG_DATA_HOME "$HOME/.local/share"
          set -gx XDG_CONFIG_HOME "$HOME/.config"
          set -gx XDG_STATE_HOME "$HOME/.local/state"
          set -gx XDG_CACHE_HOME "$HOME/.cache"

          alias wget "wget --hsts-file=/dev/null"
          set -gx GOPATH "$XDG_DATA_HOME/go"
          set -gx GRADLE_USER_HOME "$XDG_DATA_HOME/gradle"
          set -gx CARGO_HOME "$XDG_DATA_HOME/cargo"
        '';

      ".config/fish/config.fish".text = ''
        set fish_greeting

        function fish_title
            echo fish (prompt_pwd)
        end

        direnv hook fish | source
        pay-respects fish --alias | source
      '';
    };

    packages = with pkgs; [
      fish
      ripgrep
      fd
      wget
      moreutils
      zip
      unzip
      btop
      jq
      direnv
      pay-respects
    ];
  }