amadaluzian-zsh: init amadaluzian-zsh
This commit is contained in:
parent
f082ca90e4
commit
e7b8922920
20 changed files with 263 additions and 330 deletions
18
packages/amadaluzian-zsh/config/.zshrc
Normal file
18
packages/amadaluzian-zsh/config/.zshrc
Normal 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"
|
27
packages/amadaluzian-zsh/default.nix
Normal file
27
packages/amadaluzian-zsh/default.nix
Normal 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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue