feat(k8s): declare 'talos' modules
check / lint (push) Failing after 16s

This commit is contained in:
hektor committed 2026-10-31 11:57:26 +01:00
1 parent 1f3976a77f
commit 30281ef1a6
6 files changed
+81 -1

No files matched your search

+3
View File
@@ -40,7 +40,10 @@
gitea.enable = true;
github.enable = true;
};
k8s.enable = true;
k8s.k9s.enable = true;
k8s.talos.enable = true;
keyboard.vortexCore.enable = true;
keepassxc.enable = true;
music.enable = true;
newsboat.enable = true;
+7
View File
@@ -24,12 +24,19 @@ in
type = lib.types.bool;
};
};
talos = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
};
};
imports = [
./crossplane.nix
./helm.nix
./k9s.nix
./talos.nix
];
config = lib.mkIf cfg.enable {
+12
View File
@@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.k8s.talos.enable {
home.packages = [ pkgs.talosctl ];
};
}
+1
View File
@@ -55,6 +55,7 @@ in
};
desktop.ly.enable = true;
docker.enable = true;
k8s.enable = true;
hcloud.enable = true;
networking = {
enable = true;
+15 -1
View File
@@ -1,3 +1,17 @@
{ config, lib, ... }:
{
imports = [ ./crossplane.nix ];
imports = [
./crossplane.nix
./talos.nix
];
options.k8s.enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
config = lib.mkIf config.k8s.enable {
k8s.talos.enable = lib.mkDefault true;
};
}
+43
View File
@@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (config.host) username;
in
{
options.k8s.talos = {
enable = lib.mkOption {
default = false;
type = lib.types.bool;
};
platform = lib.mkOption {
default = "qemu";
type = lib.types.enum [
"docker"
"qemu"
];
};
};
config = lib.mkIf config.k8s.talos.enable (
lib.mkMerge [
(lib.mkIf (config.k8s.talos.platform == "docker") {
docker.enable = true;
assertions = [
{
assertion = !config.docker.rootless;
message = "talos in docker needs 'docker.rootless = false;'";
}
];
})
(lib.mkIf (config.k8s.talos.platform == "qemu") {
users.users.${username}.extraGroups = [ "kvm" ];
environment.systemPackages = [ pkgs.qemu ];
})
]
);
}