Files
nix-config/lib
Ryan Yin 8084f25e6f refactor(youko): disable HDD spindown from a udev rule
Apply hdparm -B 255 -S 0 whenever a disk appears, which also covers the
re-add after a bridge reset, instead of a boot oneshot plus an hourly
timer. Drop -J 0: hdparm has always aborted it without
--please-destroy-my-drive, and wdidle3 already reads disabled on both
disks (it is persistent firmware state).

This was the last user of mylib.systemdHardening.privilegedOneshot, so
remove the preset and its test group.

Assisted-by: Claude Code (claude-opus-5-5)
2026-11-01 11:42:57 -06: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)

Shared Presets

  1. systemdHardening.nix - systemd sandboxing preset for exposed services

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