amadaluzian-zsh: init amadaluzian-zsh

This commit is contained in:
Artur Manuel 2025-04-02 20:37:22 +01:00
commit e7b8922920
Signed by: amadaluzia
SSH key fingerprint: SHA256:ubvwT66gNUKSsgSzEb2UQnX8pzTq5N+r8eRVYGJJm4Q
20 changed files with 263 additions and 330 deletions

View file

@ -0,0 +1,18 @@
eval "$(@starshipPath@ init zsh)"
eval "$(@zoxidePath@ init zsh)"
source "@zsh-deferPath@"
zsh-defer source "@zsh-syntax-highlightingPath@"
zsh-defer source "@zsh-autosuggestionsPath@"
source "@fzf-tabPath@"
zstyle ':fzf-tab:*' fzf-command "@fzfPath@"
eza="@ezaPath@"
eza_options="--octal-permissions --group-directories-first --icons=never --colour=always"
alias ls="$eza -a $eza_options"
alias ll="$eza -la $eza_options"
alias tree="$eza -lT $eza_options"
alias switchbuild="nixos-rebuild switch --flake .#$HOST"

View file

@ -0,0 +1,27 @@
{ 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";
}