refactor(zsh): use nixpkgs packages for zsh plugins

Replace manual GitHub fetchFromGitHub with packaged versions of zsh plugins and consolidate plugin loading through the plugins list instead of manual sourcing.
This commit is contained in:
♥ Minnie ♥ 2025-10-04 10:25:53 +08:00
parent 9971d2d2a5
commit d6e648595a
Signed by: jasmine
GPG key ID: 8563E358D4E8040E

View file

@ -30,21 +30,20 @@
# Install plugins
plugins = [
{
{ # vi(vim) mode for ZSH
name = "zsh-vi-mode";
src = "${pkgs.zsh-vi-mode}/share/zsh-vi-mode";
}
{ # replace zsh's completion with fzf
name = "fzf-tab";
src = pkgs.fetchFromGitHub {
owner = "Aloxaf";
repo = "fzf-tab";
rev = "5a81e13792a1eed4a03d2083771ee6e5b616b9ab";
sha256 = "dPe5CLCAuuuLGRdRCt/nNruxMrP9f/oddRxERkgm1FE=";
};
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
}
];
# Extra commands that should be added to '.zshrc'
initContent = ''
eval "$(direnv hook zsh)"
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
export PATH