feat(k8s): declare 'talos' modules

This commit is contained in:
hektor committed 2026-10-31 15:37:11 +01:00
1 parent 48360e49c4
commit ea5309eff1
7 files changed
+89 -7

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (config.host) username;
in
{
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 ];
})
]
);
}