alqages/packages/amadaluzian-zsh/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2025-04-02 21:06:44 +01:00
{
symlinkJoin,
zsh,
makeWrapper,
inputs,
system,
zoxide,
eza,
zsh-fzf-tab,
zsh-defer,
zsh-autosuggestions,
zsh-syntax-highlighting,
lib,
fzf,
}:
2025-04-02 20:37:22 +01:00
symlinkJoin {
name = "amadaluzian-zsh";
paths = [
eza
2025-04-02 20:37:22 +01:00
zsh
inputs.self.packages.${system}.amadaluzian-starship
zoxide
fzf
2025-04-02 20:37:22 +01:00
];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
cp -Lr ${./config} $out/share/amadaluzian-zshrc
substituteInPlace $out/share/amadaluzian-zshrc/.zshrc \
2025-04-02 20:37:22 +01:00
--subst-var-by ezaPath ${lib.getExe' eza "eza"} \
2025-04-02 21:06:44 +01:00
--subst-var-by starshipPath ${
lib.getExe' inputs.self.packages.${system}.amadaluzian-starship "starship"
} \
2025-04-02 20:37:22 +01:00
--subst-var-by zoxidePath ${lib.getExe' zoxide "zoxide"} \
--subst-var-by fzfPath ${lib.getExe' fzf "fzf"} \
--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 \
2025-04-02 20:37:22 +01:00
wrapProgram $out/bin/zsh \
--set ZDOTDIR $out/share/amadaluzian-zshrc \
2025-04-02 20:37:22 +01:00
'';
meta.mainProgram = "zsh";
passthru.shellPath = "/bin/zsh";
}