diff options
Diffstat (limited to 'home/profiles/k8s.nix')
| -rw-r--r-- | home/profiles/k8s.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/home/profiles/k8s.nix b/home/profiles/k8s.nix new file mode 100644 index 0000000..bb176e1 --- /dev/null +++ b/home/profiles/k8s.nix @@ -0,0 +1,43 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + kind # k8s in docker + kubebuilder # generate controller + kubectl + kubernetes-helm # deploy applications + kubelogin-oidc # OIDC plugin + kubie # kubeconfig browser https://github.com/sbstp/kubie + ]; + + programs.k9s = { + enable = true; + settings = { + k9s = { + refreshRate = 1; + }; + }; + }; + + home.file.kubie = { + target = ".kube/kubie.yaml"; + text = '' + shell: fish + configs: + include: + - ~/.kube/rksconfig + prompt: + fish_use_rprompt: false + ''; + }; + + programs.fish = { + shellAbbrs = { + kctx = "kubie ctx"; + k = "kubectl"; + klogs = "kubectl logs"; + }; + shellAliases = { + ukctx = "${pkgs.gh}/bin/gh api --hostname github.rbx.com repos/Roblox/cell-lifecycle/contents/rks/kubeconfig --jq '.content' | base64 -d > ~/.kube/rksconfig"; + }; + }; +} |
