mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
* fix(k3s): bind control-plane metrics to node addresses * docs(microvm): document remote deployment workflow * fix(microvm): deploy runner before guest switch * docs(microvm): standardize on just deployment commands * docs(k3s): explain control-plane metrics address * docs(hosts): move generic build commands to host guide * docs: simplify command operation guidance
Library
This directory contains helper functions used by outputs/default.nix (and the installer flake) 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
genK3sServerModule.nix- K3s server node configuration generatorgenVmHostModule.nix- physical VM host (bridge + libvirt) configuration generatorgenMicrovmGuestModule.nix- NixOS microVM guest configuration generatorgenLibvirtDomainXml.nix- libvirt domain XML generator (imported directly by host configs)
Entry Point
default.nix- Main entry point that imports the generators and exports them as a single attribute set, plus therelativeToRootandscanPathshelpers
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