Files
nix-config-ryan4yin/hosts/k8s/kubevirt-shushou/default.nix
T
Ryan Yin cf2435e854 chore(hosts): retire the k3s cluster on the physical hosts
The physical hosts no longer need k3s or KubeVirt: aquamarine runs
natively, the k3s-test masters run as microVMs and kana/ruby under
libvirt. So drop the host cluster and split the shared parts out of the
KubeVirt host module:

- lib/genVmHostModule.nix: the host bits the VMs still need (br0 + the
  physical NIC as a bridge port, KVM, sysctls, earlyoom, libvirt,
  journald, stateVersion)
- the three hosts use it and drop genK3sServerModule; also drop the
  longhorn workarounds (openiscsi + the /usr/local/bin tmpfile) and the
  virtctl package
- remove lib/genKubeVirtHostModule.nix
2026-09-21 16:57:42 +08:00

36 lines
850 B
Nix

{
config,
pkgs,
mylib,
myvars,
disko,
...
}:
let
hostName = "kubevirt-shushou"; # Define your hostname.
coreModule = mylib.genVmHostModule {
inherit pkgs hostName;
inherit (myvars) networking;
};
in
{
imports = (mylib.scanPaths ./.) ++ [
disko.nixosModules.default
../disko-config/kubevirt-disko-fs.nix
../kubevirt-shoryu/hardware-configuration.nix
../kubevirt-shoryu/preservation.nix
coreModule
];
modules.btrbk.enable = true;
boot.kernelParams = [
# Use transparent huge pages on demand (madvise) instead of a fixed 1G hugetlb
# pool. The static pool cannot be overcommitted or shared with the host /
# other VMs, which stranded memory and blocked scheduling; the VMs now use
# ordinary memory (see the instancetypes in k8s-gitops).
"transparent_hugepage=madvise"
];
}