dotfiles/modules/common/programming/kubernetes.nix

146 lines
5.2 KiB
Nix
Raw Normal View History

2022-12-21 21:18:03 +00:00
{ config, pkgs, lib, ... }: {
2022-12-21 21:18:03 +00:00
options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools.";
2022-12-21 21:18:03 +00:00
config = lib.mkIf config.kubernetes.enable {
home-manager.users.${config.user} = {
2022-12-21 21:18:03 +00:00
home.packages = with pkgs; [
kubectl # Basic Kubernetes queries
kubernetes-helm # Helm CLI
fluxcd # Bootstrap clusters with Flux
kustomize # Kustomize CLI (for Flux)
];
2022-12-21 21:18:03 +00:00
programs.fish.shellAbbrs = {
k = "kubectl";
pods = "kubectl get pods -A";
nodes = "kubectl get nodes";
deploys = "kubectl get deployments -A";
dash = "kube-dashboard";
ks = "k9s";
};
# Terminal Kubernetes UI
programs.k9s = {
enable = true;
# settings = { k9s = { headless = true; }; };
skin = {
k9s = {
body = {
2022-11-30 06:07:45 +00:00
fgColor = config.theme.colors.base06;
2022-12-21 21:18:03 +00:00
bgColor = config.theme.colors.base00;
logoColor = config.theme.colors.base02; # *blue ?
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
# Search bar
prompt = {
2022-11-30 06:07:45 +00:00
fgColor = config.theme.colors.base06;
2022-12-21 21:18:03 +00:00
bgColor = config.theme.colors.base00;
suggestColor = config.theme.colors.base03;
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
# Header left side
info = {
fgColor = config.theme.colors.base04;
sectionColor = config.theme.colors.base05;
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
dialog = {
2022-11-30 06:07:45 +00:00
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
2022-12-21 21:18:03 +00:00
buttonFgColor = config.theme.colors.base06;
buttonBgColor = config.theme.colors.base0E;
buttonFocusFgColor = config.theme.colors.base07;
buttonFocusBgColor = config.theme.colors.base02; # *cyan
labelFgColor = config.theme.colors.base09;
fieldFgColor = config.theme.colors.base06;
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
frame = {
border = {
fgColor = config.theme.colors.base01;
focusColor = config.theme.colors.base06;
};
menu = {
fgColor = config.theme.colors.base06;
keyColor = config.theme.colors.base0E; # *magenta
numKeyColor = config.theme.colors.base0E; # *magenta
};
crumbs = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base01;
activeColor = config.theme.colors.base03;
};
status = {
newColor = config.theme.colors.base04; # *cyan
modifyColor = config.theme.colors.base0D; # *blue
addColor = config.theme.colors.base0B; # *green
errorColor = config.theme.colors.base08; # *red
highlightColor = config.theme.colors.base09; # *orange
killColor = config.theme.colors.base03; # *comment
completedColor = config.theme.colors.base03; # *comment
};
title = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
highlightColor = config.theme.colors.base09; # *orange
counterColor = config.theme.colors.base0D; # *blue
filterColor = config.theme.colors.base0E; # *magenta
};
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
views = {
charts = {
bgColor = config.theme.colors.base00;
defaultDialColors =
[ config.theme.colors.base0D config.theme.colors.base08 ];
# - *blue
# - *red
defaultChartColors =
[ config.theme.colors.base0D config.theme.colors.base08 ];
# - *blue
# - *red
};
table = {
# List of resources
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
2022-11-30 06:07:45 +00:00
2022-12-21 21:18:03 +00:00
# Row selection
cursorFgColor = config.theme.colors.base07;
cursorBgColor = config.theme.colors.base01;
2022-11-30 06:07:45 +00:00
2022-12-21 21:18:03 +00:00
# Header row
header = {
fgColor = config.theme.colors.base0D;
bgColor = config.theme.colors.base00;
sorterColor = config.theme.colors.base0A; # *selection
};
};
xray = {
fgColor = config.theme.colors.base06;
2022-11-30 06:07:45 +00:00
bgColor = config.theme.colors.base00;
2022-12-21 21:18:03 +00:00
cursorColor = config.theme.colors.base06;
graphicColor = config.theme.colors.base0D;
showIcons = false;
2022-11-30 06:07:45 +00:00
};
2022-12-21 21:18:03 +00:00
yaml = {
keyColor = config.theme.colors.base0D;
colonColor = config.theme.colors.base04;
fgColor = config.theme.colors.base03;
};
logs = {
2022-11-30 06:07:45 +00:00
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
2022-12-21 21:18:03 +00:00
indicator = {
fgColor = config.theme.colors.base06;
bgColor = config.theme.colors.base00;
};
2022-11-30 06:07:45 +00:00
};
};
};
};
};
2022-12-21 21:18:03 +00:00
2022-11-30 06:07:45 +00:00
};
};
}