diff options
| -rw-r--r-- | nix/users/fcuny/k8s.nix | 58 | ||||
| -rw-r--r-- | nix/users/fcuny/shell.nix | 7 |
2 files changed, 64 insertions, 1 deletions
diff --git a/nix/users/fcuny/k8s.nix b/nix/users/fcuny/k8s.nix index cbc04ef..8e82a70 100644 --- a/nix/users/fcuny/k8s.nix +++ b/nix/users/fcuny/k8s.nix @@ -7,12 +7,68 @@ kubernetes-helm # deploy applications kubie # kubeconfig browser https://github.com/sbstp/kubie kubelogin-oidc # OIDC plugin - k9s # object explorer # docker dive # explore layers in docker images ]; + 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 = '' diff --git a/nix/users/fcuny/shell.nix b/nix/users/fcuny/shell.nix index f5d83e5..5d10385 100644 --- a/nix/users/fcuny/shell.nix +++ b/nix/users/fcuny/shell.nix @@ -91,6 +91,13 @@ in }; }; + programs.bat = { + enable = true; + config = { + pager = "less -FR"; + }; + }; + programs.starship = { enable = true; settings = { |
