replaced any-nix-shell with newer nix-your-shell

This commit is contained in:
2026-08-24 14:19:06 +01:00
parent 6a3839a38e
commit 9c28a8b6db

View File

@@ -54,54 +54,56 @@
else "echo 'Flake location not specified. Did you build with --impure?'"; else "echo 'Flake location not specified. Did you build with --impure?'";
}; };
zshrc.content = '' zshrc.content = ''
source ${./devenv.zsh} source ${./devenv.zsh}
if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then
function zle-line-init() { echoti smkx } function zle-line-init() { echoti smkx }
function zle-line-finish() { echoti rmkx } function zle-line-finish() { echoti rmkx }
zle -N zle-line-init zle -N zle-line-init
zle -N zle-line-finish zle -N zle-line-finish
fi fi
autoload -U compinit && compinit autoload -U compinit && compinit
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
source <(${lib.getExe pkgs.carapace} _carapace) source <(${lib.getExe pkgs.carapace} _carapace)
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
autoload -U select-word-style autoload -U select-word-style
select-word-style bash select-word-style bash
autoload -U up-line-or-beginning-search down-line-or-beginning-search autoload -U up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search zle -N down-line-or-beginning-search
bindkey "^[OA" up-line-or-beginning-search bindkey "^[OA" up-line-or-beginning-search
bindkey "^[OB" down-line-or-beginning-search bindkey "^[OB" down-line-or-beginning-search
bindkey "^[[1;5C" forward-word bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" kill-word bindkey "^[[3;5~" kill-word
bindkey "^H" backward-kill-word bindkey "^H" backward-kill-word
source <(${lib.getExe pkgs.fzf} --zsh) source <(${lib.getExe pkgs.fzf} --zsh)
setopt NO_CASE_GLOB setopt NO_CASE_GLOB
${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin if command -v ${lib.getExe pkgs.nix-your-shell} > /dev/null; then
${lib.getExe pkgs.nix-your-shell} -- zsh | source /dev/stdin
fi
export EDITOR=nvim export EDITOR=nvim
eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)" eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)"
eval "$(${lib.getExe pkgs.devenv} hook zsh)" eval "$(${lib.getExe pkgs.devenv} hook zsh)"
typeset -ag precmd_functions typeset -ag precmd_functions
if (( ! ''${precmd_functions[(I)__devenv_reload_apply]} )); then if (( ! ''${precmd_functions[(I)__devenv_reload_apply]} )); then
precmd_functions+=(__devenv_reload_apply) precmd_functions+=(__devenv_reload_apply)
fi fi
if (( ! ''${precmd_functions[(I)__devenv_restore_path]} )); then if (( ! ''${precmd_functions[(I)__devenv_restore_path]} )); then
precmd_functions+=(__devenv_restore_path) precmd_functions+=(__devenv_restore_path)
fi fi
''; '';
}; };
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap { ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {