Files
nix-config/lib/README.md
T
ryan4yin | 二花 18925eac8b fix(colmena): expose colmenaHive for the nix-community evaluator (#361)
* fix(colmena): expose colmenaHive for the new evaluator

nixpkgs now ships the nix-community Colmena rewrite, whose default
evaluator reads an evaluated colmenaHive flake output instead of the raw
colmena hive. Without it every colmena apply recipe failed with
"does not provide attribute colmenaHive".

Add a colmena input pinned to the same v0.5.0 as nixpkgs and expose
colmenaHive = colmena.lib.makeHive <raw hive>, with the raw hive kept as
an internal binding rather than a flake output of its own.

* chore: clean up stale colmena and aquamarine references

- point the Colmena links at nix-community/colmena after the move
- rename the security-aquamarine-metrics test to youko-metrics (it
  already tested youko) and update the outputs README
- drop the commented aquamarine remote-builder example
2026-10-03 12:14:13 +08:00

1.6 KiB

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

  1. attrs.nix - Attribute set manipulation utilities
  2. macosSystem.nix - macOS configuration generator for nix-darwin
  3. nixosSystem.nix - NixOS configuration generator
  4. colmenaSystem.nix - Remote deployment configuration for colmena

Specialized Module Generators

  1. genK3sServerModule.nix - K3s server node configuration generator
  2. genK3sAgentModule.nix - K3s agent/worker node configuration generator
  3. genVmHostModule.nix - physical VM host (bridge + libvirt) configuration generator
  4. genMicrovmGuestModule.nix - NixOS microVM guest configuration generator
  5. genLibvirtDomainXml.nix - libvirt domain XML generator (imported directly by host configs)

Entry Point

  1. default.nix - Main entry point that imports the generators and exports them as a single attribute set, plus the relativeToRoot and scanPaths helpers

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