summaryrefslogtreecommitdiffstats
path: root/zsh.nix
blob: d4ec73b5e9dd1051f6b5b001f3128bbb8b11c763 (plain) (blame)
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
{
  config,
  pkgs,
  ...
}: {
  programs.zsh = {
    enable = true;
    enableAutosuggestions = true;
    enableBashCompletion = true;
    enableCompletion = true;
    enableGlobalCompInit = true;
    enableFastSyntaxHighlighting = true;
    enableFzfCompletion = true;
    enableFzfGit = true;
    enableFzfHistory = true;
    histFile = "$HOME/.zsh_history";
    histSize = 100000;
    promptInit = ''
      PROMPT=$'%{\e[97m%}[%{\e[m%}%{\e[92m%}%n%{\e[m%}%{\e[32m%}@%{\e[m%}%{\e[92m%}%m%{\e[m%}:%{\e[92m%}%~%{\e[m%}%{\e[97m%}]%{\e[m%}%{\e[97m%}%#%{\e[m%} '
    '';
    interactiveShellInit = ''
      eval "$(direnv hook zsh)"

      bindkey -v
      export KEYTIMEOUT=1
    '';
  };
}