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
Library
This directory contains helper functions used by flake.nix to reduce code duplication and make it
easier to add new machines.
Current Functions
Core System Generators
attrs.nix- Attribute set manipulation utilitiesmacosSystem.nix- macOS configuration generator for nix-darwinnixosSystem.nix- NixOS configuration generatorcolmenaSystem.nix- Remote deployment configuration for colmena
Specialized Module Generators
genK3sAgentModule.nix- K3s agent node configuration generatorgenK3sServerModule.nix- K3s server node configuration generatorgenKubeVirtGuestModule.nix- KubeVirt guest VM configuration generatorgenKubeVirtHostModule.nix- KubeVirt host configuration generator
Entry Point
default.nix- Main entry point that imports all functions and exports them as a single attribute set
Usage
These functions are designed to:
- Generate consistent configurations across different architectures
- Provide type-safe configuration for complex systems
- Enable easy scaling of the infrastructure
- Support both local development and production deployments
Architecture Support
- x86_64-linux: Primary desktop systems
- aarch64-linux: ARM64 Linux systems (Apple Silicon, SBCs)
- aarch64-darwin: Apple Silicon macOS systems