nixos-config/home-manager/modules/zsh.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

{
programs.zsh = {
enable = true;
oh-my-zsh = {
enable = true;
2024-01-16 14:31:21 +00:00
plugins = [ "git" "fzf" "kubectx" ];
theme = "kolo";
};
history = {
share = false; # every terminal has it's own history
extended = true;
size = 10000;
};
shellAliases = {
"k" = "kubectl";
"kx" = "kubectx";
"dl" = "ls -lhtr --color=always ~/Downloads | tail -n 10"; # Show the 10 newest Downloads
2024-07-15 16:47:41 +00:00
"buzzer" = "ssh -i Nextcloud/Privat/id_door door@door.cccda.de buzzer";
"beep" = "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"; # play "ding" for long running jobs
"dig" = "dig +short";
"cat" = "bat --theme=TwoDark --style=plain";
};
initExtra = ''
autoload -U colors && colors
function is_ssh(){
if [ ! -z $SSH_CLIENT ]; then
echo %{$fg[red]%}SSH-Session on $(hostname -s)%{$reset_color%}
fi
}
RPS1='$(is_ssh) $(kubectx_prompt_info)'
export EDITOR="nvim";
export PATH="$PATH:$HOME/.krew/bin:$HOME/bin:$HOME/go/bin";
source <(kubectl completion zsh)
2024-03-28 13:26:59 +00:00
eval "$(direnv hook zsh)"
'';
};
}