aboutsummaryrefslogtreecommitdiff
path: root/modules/terminal/system/programs/fish.nix
blob: fe3ff88ba5b9b796c7326cba17c8d7ba761f452a (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
{
  pkgs,
  config,
  lib,
  ...
}: let
  cfg = config.collinux.terminal.shells.fish;

  init = ''
    set fish_greeting

    function fish_title
        echo fish (prompt_pwd)
    end

    direnv hook fish | source
    pay-respects fish --alias | source
  '';
in
  lib.mkIf cfg.enable {
    hjem.users."${config.collinux.user.name}" = {
      files = {
        ".config/fish/config.fish".text = init;
      };

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