mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +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
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