mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-28 09:12:33 +01:00
Drop the now-meaningless kubevirt- prefix and move the hosts out of hosts/k8s/, following the existing 12kingdoms-shoukei layout: the directory and output carry the theme prefix while the configuration, hostname and colmena target are the bare name (shoryu, shushou, youko). - hosts/k8s/kubevirt-* -> hosts/12kingdoms-*; the shared disko config becomes host-disko-fs.nix; the now-different relative imports are fixed - outputs, vars/networking.nix keys, the Justfile recipes/tags, the eval tests and the docs follow - colmena reaches these hosts by IP (a new targetHost override), since their DNS name changes with the hostname and is not resolvable until the router learns it
38 lines
808 B
Nix
38 lines
808 B
Nix
{
|
|
microvm,
|
|
myvars,
|
|
mylib,
|
|
agenix,
|
|
mysecrets,
|
|
...
|
|
}:
|
|
{
|
|
# Run the k3s-test VMs as MicroVMs instead of KubeVirt domains.
|
|
imports = [ microvm.nixosModules.host ];
|
|
|
|
microvm.vms.k3s-test-1-master-2 = {
|
|
autostart = true;
|
|
restartIfChanged = true;
|
|
specialArgs = {
|
|
inherit
|
|
myvars
|
|
mylib
|
|
agenix
|
|
mysecrets
|
|
;
|
|
};
|
|
config.imports = [ ../k8s/k3s-test-1-master-2 ];
|
|
};
|
|
|
|
# Attach the guest's tap to the VM bridge, the same way the physical NIC is
|
|
# attached. The tap name is derived from the guest IP (192.168.5.115 -> vm115).
|
|
systemd.network.networks."20-vm115" = {
|
|
matchConfig.Name = [ "vm115" ];
|
|
networkConfig = {
|
|
LinkLocalAddressing = "no";
|
|
Bridge = "br0";
|
|
};
|
|
linkConfig.RequiredForOnline = "no";
|
|
};
|
|
}
|