2023-09-15 13:23:59 +00:00
|
|
|
{
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
2024-01-16 14:31:21 +00:00
|
|
|
plugins = [ "git" "fzf" "kubectx" ];
|
2023-09-15 13:23:59 +00:00
|
|
|
theme = "kolo";
|
|
|
|
};
|
|
|
|
history = {
|
|
|
|
share = false; # every terminal has it's own history
|
2024-01-08 10:38:03 +00:00
|
|
|
extended = true;
|
2023-09-15 13:23:59 +00:00
|
|
|
size = 10000;
|
|
|
|
};
|
|
|
|
shellAliases = {
|
2023-09-26 14:21:05 +00:00
|
|
|
"k" = "kubectl";
|
2024-01-17 16:51:57 +00:00
|
|
|
"kx" = "kubectx";
|
2023-09-15 13:23:59 +00:00
|
|
|
"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";
|
2023-12-13 11:15:22 +00:00
|
|
|
"beep" = "paplay /usr/share/sounds/freedesktop/stereo/complete.oga"; # play "ding" for long running jobs
|
2024-01-17 16:51:57 +00:00
|
|
|
"dig" = "dig +short";
|
2024-02-01 13:19:15 +00:00
|
|
|
"cal" = "ncal -b";
|
2023-09-15 13:23:59 +00:00
|
|
|
};
|
2023-09-26 14:21:05 +00:00
|
|
|
initExtra = ''
|
2024-01-16 14:31:31 +00:00
|
|
|
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)'
|
2023-09-26 14:21:05 +00:00
|
|
|
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)"
|
2023-09-26 14:21:05 +00:00
|
|
|
'';
|
2023-09-15 13:23:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|