feat(k8s): add enable option

This commit is contained in:
2026-05-22 10:24:40 +02:00
parent 7d4e514f97
commit a191c89549
6 changed files with 98 additions and 45 deletions

View File

@@ -1,29 +1,44 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
argocd
fluxcd
k3d
kubectl
kubernetes
kustomize
minikube
opentofu
upbound
];
programs.kubecolor = {
enable = true;
enableAlias = true;
};
home.shellAliases = {
k = "kubectl";
};
config,
lib,
pkgs,
...
}:
let
cfg = config.k8s;
in
{
imports = [
./helm.nix
./k9s.nix
];
options.k8s.enable = lib.mkEnableOption "k8s";
config = lib.mkIf cfg.enable {
k8s.helm.enable = lib.mkDefault true;
k8s.k9s.enable = lib.mkDefault true;
home.packages = with pkgs; [
argocd
fluxcd
k3d
kubectl
kubernetes
kustomize
minikube
opentofu
upbound
];
programs.kubecolor = {
enable = true;
enableAlias = true;
};
home.shellAliases = {
k = "kubectl";
};
};
}

View File

@@ -1,15 +1,27 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(wrapHelm kubernetes-helm {
plugins = with kubernetes-helmPlugins; [
helm-diff
helm-git
helm-schema
helm-secrets
helm-unittest
];
})
];
config,
lib,
pkgs,
...
}:
let
cfg = config.k8s.helm;
in
{
options.k8s.helm.enable = lib.mkEnableOption "helm";
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
(wrapHelm kubernetes-helm {
plugins = with kubernetes-helmPlugins; [
helm-diff
helm-git
helm-schema
helm-secrets
helm-unittest
];
})
];
};
}

View File

@@ -1,10 +1,23 @@
{
programs.k9s = {
enable = true;
settings.k9s = {
ui = {
logoless = true;
reactive = true;
config,
lib,
...
}:
let
cfg = config.k8s.k9s;
in
{
options.k8s.k9s.enable = lib.mkEnableOption "";
config = lib.mkIf cfg.enable {
programs.k9s = {
enable = true;
settings.k9s = {
ui = {
logoless = true;
reactive = true;
};
};
};
};