feat(k8s): declare 'talos' modules
This commit is contained in:
1 parent
48360e49c4
commit
ea5309eff1
7 files changed
+89
-7
No files matched your search
@@ -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 ];
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user