diff --git a/home/apps/kubernetes.nix b/home/apps/kubernetes.nix index eac1d52..2068454 100644 --- a/home/apps/kubernetes.nix +++ b/home/apps/kubernetes.nix @@ -12,7 +12,6 @@ gojq jqp konf - krew kubecolor kubeconform kubectl @@ -27,6 +26,16 @@ velero ]; + programs.zsh.initExtra = '' + # kubecolor + compdef kubecolor=kubectl + # konf + source <(konf-go shellwrapper zsh) + source <(konf completion zsh) + # ignore if konf store hasn't been initialized + konf set - >/dev/null 2>&1 + ''; + home.shellAliases = { jq = "gojq"; kcn = "konf ns"; diff --git a/home/apps/zsh.nix b/home/apps/zsh.nix index f495f9c..fc84228 100644 --- a/home/apps/zsh.nix +++ b/home/apps/zsh.nix @@ -151,7 +151,7 @@ in { oh-my-zsh = { enable = true; plugins = - ["colored-man-pages" "colorize" "git"] + ["colored-man-pages" "colorize" "git" "kubectl"] ++ lib.optionals pkgs.stdenv.isDarwin ["dash" "macos"]; }; plugins = zshPlugins [