all repos — dotfiles @ 9cea53dd4a34114c3ebe2f404ff5b5238978fb4d

my *nix dotfiles

bin/kcfg.nix (view raw)

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