mirror of
https://github.com/kossLAN/zsh-flake.git
synced 2025-11-04 17:59:50 -05:00
nix/wrapZsh: add ability to add extraPackages, specifically for using fzf
This commit is contained in:
parent
c17349b5d9
commit
15c3d6eae6
2 changed files with 16 additions and 7 deletions
|
|
@ -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
|
||||||
|
|
@ -24,6 +28,9 @@ in {
|
||||||
bindkey -v
|
bindkey -v
|
||||||
bindkey "^[[1;5C" forward-word
|
bindkey "^[[1;5C" forward-word
|
||||||
bindkey "^[[1;5D" backward-word
|
bindkey "^[[1;5D" backward-word
|
||||||
|
|
||||||
|
# Special plugin cases
|
||||||
|
source <(fzf --zsh)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# A list of path's to a plugin
|
# A list of path's to a plugin
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,11 @@ in
|
||||||
paths = [pkgs.zsh];
|
paths = [pkgs.zsh];
|
||||||
buildInputs = [pkgs.makeWrapper];
|
buildInputs = [pkgs.makeWrapper];
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
# When it comes to zsh options, I'm probably missing some important ones,
|
# When it comes to zsh options, I'm probably missing some important ones,
|
||||||
# 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" #sh
|
||||||
|
|
||||||
''
|
''
|
||||||
# Auto suggestions
|
# Auto suggestions
|
||||||
|
|
@ -53,10 +53,12 @@ in
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
conf.plugins}
|
conf.plugins}
|
||||||
${conf.extraZshrc}
|
|
||||||
|
${conf.extraZshrc}
|
||||||
''} $out/etc/zsh/.zshrc
|
''} $out/etc/zsh/.zshrc
|
||||||
|
|
||||||
wrapProgram $out/bin/zsh \
|
wrapProgram $out/bin/zsh \
|
||||||
--set ZDOTDIR "$out/etc/zsh" \
|
--prefix PATH : "${lib.makeBinPath conf.extraPackages}" \
|
||||||
|
--set ZDOTDIR "$out/etc/zsh"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue