blob: 30aca44c4ef44a11005512ff357adf1fe340b048 [file] [log] [blame]
Samuel Shuert02ffd1e2024-02-13 21:37:15 -05001{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7{
8
9 options.chimera.shell.zsh = {
10 enable = lib.mkEnableOption "Enable ZSH Shell";
11 default = lib.mkOption {
12 type = lib.types.bool;
13 description = "Set as default shell";
14 default = true;
15 };
16 extraAliases = lib.mkOption {
Samuel Shuertb24d7632024-02-20 20:51:09 +000017 type = lib.types.attrsOf lib.types.str;
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050018 description = "Attrset of extra shell aliases";
19 default = { };
20 };
21 dirHashes = lib.mkOption {
Samuel Shuertb24d7632024-02-20 20:51:09 +000022 type = lib.types.attrsOf lib.types.str;
Samuel Shuert02ffd1e2024-02-13 21:37:15 -050023 description = "Attrset of ~DIR's";
24 default = { };
25 };
26 };
27
28 config = lib.mkIf config.chimera.shell.zsh.enable {
29 programs.zsh = {
30 enable = true;
31 enableAutosuggestions = true;
32 enableCompletion = true;
33 autocd = true;
34 defaultKeymap = "emacs";
35
36 shellAliases = config.chimera.shell.zsh.extraAliases;
37
38 dirHashes = config.chimera.shell.zsh.dirHashes;
39
40 history = {
41 extended = true;
42 };
43 historySubstringSearch.enable = true;
44
45 oh-my-zsh = {
46 enable = true;
47 plugins = [ "git" ];
48 };
49 };
50 };
51}