mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
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
32 lines
984 B
Nix
32 lines
984 B
Nix
{ lib, ... }:
|
|
{
|
|
colmenaSystem = import ./colmenaSystem.nix;
|
|
macosSystem = import ./macosSystem.nix;
|
|
nixosSystem = import ./nixosSystem.nix;
|
|
|
|
attrs = import ./attrs.nix { inherit lib; };
|
|
|
|
genK3sServerModule = import ./genK3sServerModule.nix;
|
|
genK3sAgentModule = import ./genK3sAgentModule.nix;
|
|
genVmHostModule = import ./genVmHostModule.nix;
|
|
genKubeVirtGuestModule = import ./genKubeVirtGuestModule.nix;
|
|
genMicrovmGuestModule = import ./genMicrovmGuestModule.nix;
|
|
|
|
# use path relative to the root of the project
|
|
relativeToRoot = lib.path.append ../.;
|
|
scanPaths =
|
|
path:
|
|
builtins.map (f: (path + "/${f}")) (
|
|
builtins.attrNames (
|
|
lib.attrsets.filterAttrs (
|
|
path: _type:
|
|
(_type == "directory") # include directories
|
|
|| (
|
|
(path != "default.nix") # ignore default.nix
|
|
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
|
)
|
|
) (builtins.readDir path)
|
|
)
|
|
);
|
|
}
|