aboutsummaryrefslogtreecommitdiff
path: root/modules/user/zsh/default.nix
blob: 3d522795548552f98cb21209c25a5d60c48fc4f6 (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
29
30
31
32
{
  config,
  lib,
  options,
  ...
}:
{
  config.programs = {
    direnv.enable = lib.mkDefault config.programs.zsh.enable;
    zsh = {
      enable = lib.mkDefault true; # default user shell
      autocd = true;
      autosuggestion = {
        enable = lib.mkDefault true;
        strategy = [
          "history"
          "completion"
        ];
      };

      history.ignoreAllDups = true;
      initContent = builtins.readFile ./zshrc.zsh;
      loginExtra = builtins.readFile ./zlogin.zsh;
      setOptions = [ "extendedglob" ];
      shellAliases = {
        k = "kak";
      };

      syntaxHighlighting.enable = true;
    };
  };
}