Files
nix-config/hosts/12kingdoms-youko/default.nix
T
Ryan Yin 2c7629000f refactor: rename the three VM hosts to 12kingdoms-*
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
2026-09-21 17:10:14 +08:00

42 lines
975 B
Nix

{
config,
pkgs,
mylib,
myvars,
disko,
...
}:
let
hostName = "youko"; # Define your hostname.
coreModule = mylib.genVmHostModule {
inherit pkgs hostName;
inherit (myvars) networking;
};
in
{
imports = (mylib.scanPaths ./.) ++ [
disko.nixosModules.default
../k8s/disko-config/host-disko-fs.nix
../12kingdoms-shoryu/hardware-configuration.nix
../12kingdoms-shoryu/preservation.nix
coreModule
];
modules.btrbk.enable = true;
boot.kernelParams = [
# Use transparent huge pages on demand (madvise) instead of a fixed 1G hugetlb
# pool (cannot be overcommitted/shared; it stranded memory and blocked
# scheduling). The VMs now use ordinary memory.
"transparent_hugepage=madvise"
# https://kubevirt.io/user-guide/compute/host-devices/
#
# PCI passthrough
# "amd_iommu=on" # enable IOMMU
# "iommu=pt" # use passthrough mode
# "pcie_acs_override=downstream" # enable ACS override
];
}