{ programs.zsh = { enable = true; oh-my-zsh = { enable = true; plugins = [ "git" "fzf" "kubectx" ]; theme = "kolo"; }; history = { share = false; # every terminal has it's own history durring runtime extended = true; size = 10000; }; shellAliases = { "k" = "kubectl"; "kx" = "kubectx"; "kn" = "kubechn"; "kc" = "kubechc"; "dl" = "ls -lhtr --color=always ~/Downloads | tail -n 10"; # Show the 10 newest Downloads "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"; "watch" = "watch "; # https://unix.stackexchange.com/a/25329 "kge" = "kubectl get events --sort-by='.lastTimestamp'"; }; initExtra = '' setopt APPEND_HISTORY # Append history to global histfile on exit autoload -U colors && colors function is_ssh(){ if [ ! -z $SSH_CLIENT ]; then echo %{$fg[red]%}SSH-Session on $(hostname -s)%{$reset_color%} fi } function get_k8s_info(){ kubectl config get-contexts| grep "*" | awk '{print $3"/"$5}' } RPS1='$(is_ssh) $(get_k8s_info)' export EDITOR="nvim"; export PATH="$PATH:$HOME/.krew/bin:$HOME/bin:$HOME/go/bin"; source <(kubectl completion zsh) source ~/repos/kubech/kubech export GOPRIVATE=gitlab.com export GOAUTH=netrc eval "$(direnv hook zsh)" ''; }; }