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

@@ -57,8 +57,14 @@
cloud.hetzner.enable = true;
comms.signal.enable = true;
git.github.enable = true;
shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true;
shell = {
enable = true;
bash.aliases.lang-js = true;
bash.addBinToPath = true;
};
anki.enable = true;
k8s.k9s.enable = true;
taskwarrior.enable = true;
audio.enable = true;
ssh.enable = true;
music.enable = true;

View File

@@ -53,8 +53,14 @@
cloud.hetzner.enable = true;
comms.signal.enable = true;
git.github.enable = true;
shell.bash.aliases.lang-js = true;
shell.bash.addBinToPath = true;
shell = {
enable = true;
bash.aliases.lang-js = true;
bash.addBinToPath = true;
};
anki.enable = true;
k8s.k9s.enable = true;
taskwarrior.enable = true;
my.yubikey.enable = true;
audio.enable = true;
ssh.enable = true;

View File

@@ -89,6 +89,7 @@
postgresql.enable = true;
redis.enable = true;
};
k8s.enable = true;
git.github.enable = true;
git.gitlab.enable = true;
secrets.vault.enable = true;

View File

@@ -1,6 +1,25 @@
{ pkgs, ... }:
{
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
@@ -21,9 +40,5 @@
home.shellAliases = {
k = "kubectl";
};
imports = [
./helm.nix
./k9s.nix
];
};
}

View File

@@ -1,6 +1,17 @@
{ pkgs, ... }:
{
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; [
@@ -12,4 +23,5 @@
];
})
];
};
}

View File

@@ -1,4 +1,16 @@
{
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 = {
@@ -8,4 +20,5 @@
};
};
};
};
}