27 lines
1.3 KiB
Nix
27 lines
1.3 KiB
Nix
{ symlinkJoin, zsh, makeWrapper, inputs, system, zoxide, eza, zsh-fzf-tab, zsh-defer, zsh-autosuggestions, zsh-syntax-highlighting, lib, fzf }:
|
|
symlinkJoin {
|
|
name = "amadaluzian-zsh";
|
|
paths = [
|
|
zsh
|
|
inputs.self.packages.${system}.amadaluzian-starship
|
|
zoxide
|
|
];
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
postBuild = ''
|
|
cp -Lr ${./config} $out/share/zshrc
|
|
substituteInPlace $out/share/zshrc/.zshrc \
|
|
--subst-var-by ezaPath ${lib.getExe' eza "eza"} \
|
|
--subst-var-by fzf-tabPath ${zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh \
|
|
--subst-var-by zsh-deferPath ${zsh-defer}/share/zsh-defer/zsh-defer.plugin.zsh \
|
|
--subst-var-by zsh-syntax-highlightingPath ${zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh \
|
|
--subst-var-by zsh-autosuggestionsPath ${zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh \
|
|
--subst-var-by starshipPath ${lib.getExe' inputs.self.packages.${system}.amadaluzian-starship "starship"} \
|
|
--subst-var-by zoxidePath ${lib.getExe' zoxide "zoxide"} \
|
|
--subst-var-by fzfPath ${lib.getExe' fzf "fzf"} \
|
|
|
|
wrapProgram $out/bin/zsh \
|
|
--set ZDOTDIR $out/share/zshrc \
|
|
'';
|
|
meta.mainProgram = "zsh";
|
|
passthru.shellPath = "/bin/zsh";
|
|
}
|