bin/kcfg.nix (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13
{ pkgs, ... }: let name = "kcfg"; fzy = "${pkgs.fzy}/bin/fzy"; fd = "${pkgs.fd}/bin/fd"; in pkgs.writeShellScriptBin name '' cfg="$(${fd} . ~/code/upcloud/.kube | ${fzy})" export KUBECONFIG="$cfg" echo "KUBECONFIG set to $cfg" ''