aboutsummaryrefslogtreecommitdiff
path: root/users/profiles/k8s.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/profiles/k8s.nix')
-rw-r--r--users/profiles/k8s.nix79
1 files changed, 7 insertions, 72 deletions
diff --git a/users/profiles/k8s.nix b/users/profiles/k8s.nix
index ec59228..dd3d88b 100644
--- a/users/profiles/k8s.nix
+++ b/users/profiles/k8s.nix
@@ -1,87 +1,22 @@
-{ pkgs, ... }:
+{ self, pkgs, ... }:
{
+
+ import = [
+ "${self}/users/programs/k9s.nix"
+ "${self}/users/programs/kubie.nix"
+ ];
+
home.packages = with pkgs; [
kind # k8s in docker
kubebuilder # generate controller
kubectl
kubernetes-helm # deploy applications
- kubie # kubeconfig browser https://github.com/sbstp/kubie
kubelogin-oidc # OIDC plugin
];
- programs.k9s = {
- enable = true;
- settings = {
- k9s = {
- refreshRate = 1;
- };
- };
- plugin = {
- plugins = {
- log-bat = {
- shortCut = "Shift-L";
- description = "Logs (bat)";
- scopes = [ "po" ];
- command = "bash";
- background = false;
- args = [
- "-c"
- "\"$@\" | bat"
- "dummy-arg"
- "kubectl"
- "logs"
- "$NAME"
- "-n"
- "$NAMESPACE"
- "--context"
- "$CONTEXT"
- "--kubeconfig"
- "$KUBECONFIG"
- ];
- };
- log-bat-container = {
- shortCut = "Shift-L";
- description = "Logs (bat)";
- scopes = [ "containers" ];
- command = "bash";
- background = false;
- args = [
- "-c"
- "\"$@\" | bat"
- "dummy-arg"
- "kubectl"
- "logs"
- "-c"
- "$NAME"
- "$POD"
- "-n"
- "$NAMESPACE"
- "--context"
- "$CONTEXT"
- "--kubeconfig"
- "$KUBECONFIG"
- ];
- };
- };
- };
- };
-
- home.file.kubie = {
- target = ".kube/kubie.yaml";
- text = ''
- shell: fish
- configs:
- include:
- - ~/.kube/rksconfig
- prompt:
- fish_use_rprompt: false
- '';
- };
-
programs.fish = {
shellAbbrs = {
k = "kubectl";
- kctx = "kubie ctx";
klogs = "kubectl logs";
};
shellAliases = {