diff --git a/modules/shell/default.nix b/modules/shell/default.nix index 26dca0f..717f050 100644 --- a/modules/shell/default.nix +++ b/modules/shell/default.nix @@ -1,4 +1,5 @@ [ ./git.nix ./fish.nix + ./zsh.nix ] diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix new file mode 100644 index 0000000..cfd7ee3 --- /dev/null +++ b/modules/shell/zsh.nix @@ -0,0 +1,54 @@ +{ + lib, + pkgs, + vars, + ... +}: { + home-manager.users.${vars.user} = { + programs.zsh = { + enable = true; + autocd = true; + dotDir = ".config/zsh"; + enableAutosuggestions = true; + enableCompletion = true; + shellAliases = { + sl = "eza"; + ls = "eza"; + l = "eza -l"; + la = "eza -la"; + ip = "ip --color=auto"; + }; + + initExtra = '' + [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh + ''; + + zplug = { + enable = true; + plugins = [ + { + name = "romkatv/powerlevel10k"; + tags = ["as:theme" "depth:1"]; + } + ]; + }; + + plugins = [ + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.7.0"; + sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1"; + }; + } + ]; + }; + programs.fzf = { + enable = true; + enableZshIntegration = true; + }; + }; +}