all repos — dotfiles @ 0a867ad2e58c21d31f0ce106ab5812a152c6b83f

my *nix dotfiles

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"
  ''