all repos — dotfiles @ 00c0f24d1ad4e8df95f14a17ad1a3166ad3a088a

my *nix dotfiles

bin/kctx.nix (view raw)

 1{ pkgs, ... }:
 2
 3let
 4  name = "kctx";
 5  kubectx = "${pkgs.kubectx}/bin/kubectx";
 6  fzy = "${pkgs.fzy}/bin/fzy";
 7in
 8pkgs.writeShellScriptBin name
 9  ''
10    ctx="$(${kubectx} | ${fzy})"
11    ${kubectx} "$ctx"
12  ''