Files
nix-config/lib
Ryan Yin d4aa25d368 fix(k3s): deny pod sources the etcd client port 2379
The etcd client API listens on the masters' static LAN address, and the
pod-source deny lists omitted it. Add 2379 to both nft drop lines and
assert it in the security-k3s-pod-firewall eval test. 2381 (etcd
metrics, scraped by in-cluster monitoring) stays reachable by design.

Pairs with the matching Cilium egressDeny port in k8s-gitops.

Assisted-by: DeepSeek Harness (gpt-6-astra)
2026-10-24 14:16:14 +08:00
..

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. macosSystem.nix - macOS configuration generator for nix-darwin
  2. nixosSystem.nix - NixOS configuration generator
  3. 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

The generators import the shared host modules, so a new machine supplies its own values and system-specific attributes. colmenaSystem covers remote deployment, and genLibvirtDomainXml renders the domain XML for one guest.

Architecture Support

  • x86_64-linux: Primary desktop systems
  • aarch64-linux: ARM64 Linux systems (Apple Silicon, SBCs)
  • aarch64-darwin: Apple Silicon macOS systems