nix/wrapZsh: add a better way to add additional packages

This commit is contained in:
kossLAN 2025-04-25 21:32:35 -04:00
parent a6cd75f1c3
commit 0c721ba4be
Signed by: kossLAN
SSH key fingerprint: SHA256:bdV0x+wdQHGJ6LgmstH3KV8OpWY+OOFmJcPcB0wQPV8
2 changed files with 12 additions and 7 deletions

View file

@ -15,6 +15,10 @@ in {
# Whether or not to enable auto suggestions # Whether or not to enable auto suggestions
autoSuggestions = true; autoSuggestions = true;
extraPackages = with pkgs; [
fzf
];
# Additional .zshrc configuration that you can add that will be appended to the .zshrc # Additional .zshrc configuration that you can add that will be appended to the .zshrc
extraZshrc = '' extraZshrc = ''
# Stupid thing broken in NixOS module I think # Stupid thing broken in NixOS module I think
@ -26,7 +30,7 @@ in {
bindkey "^[[1;5D" backward-word bindkey "^[[1;5D" backward-word
# Special plugin cases # Special plugin cases
source <(${lib.getExe pkgs.fzf} --zsh) source <(fzf --zsh)
''; '';
# A list of path's to a plugin # A list of path's to a plugin

View file

@ -14,8 +14,7 @@ in
# if you know of any that I should add please make an issue for me, thank you. # if you know of any that I should add please make an issue for me, thank you.
# The sh comment before the multiline is for syntax highlighting in neovim. # The sh comment before the multiline is for syntax highlighting in neovim.
mkdir -p $out/etc/zsh mkdir -p $out/etc/zsh
cp ${pkgs.writeText "zshrc" #sh cp ${pkgs.writeText "zshrc"
'' ''
# Auto suggestions # Auto suggestions
${ ${
@ -31,6 +30,8 @@ in
HISTFILE="$HOME/.zsh_history" HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
PATH=${lib.makeBinPath conf.extraPackages}:$PATH
setopt AUTO_CD setopt AUTO_CD
setopt AUTO_PUSHD setopt AUTO_PUSHD
setopt PUSHD_IGNORE_DUPS setopt PUSHD_IGNORE_DUPS