Skip to content

Modules ​

System modules under hosts/modules let hosts share options, service wiring, and defaults.

Module Areas ​

  • hosts/modules/conf General configuration helpers used by hosts.
  • hosts/modules/darwin nix-darwin launchd and service modules.
  • hosts/modules/exporters Monitoring-specific modules like nvme.
  • hosts/modules/games Game server modules.
  • hosts/modules/servers Reusable NixOS services and self-hosted applications.

What To Look For ​

  • A host should import a module because the behavior is reusable, not because the host file is getting crowded.
  • Modules are where service defaults, option wiring, and systemd or launchd integration should live.
  • Start with one module and a host that imports it.

Module Vs Package ​

  • A package builds software.
  • A module configures software or a subsystem.
  • Many useful repo features involve both, a package to produce the binary, then a module to run and configure it.

Exported Flake Modules & Guides ​

  • flake.nix exports nixosModules.agy-remote, nixosModules.codex-remote, and nixosModules.claude-code-remote for external consumers, backed by evaluation and VM tests in tests/agent-remote.nix.
  • For rootless Podman agent sandboxes, see the Hermes Agent Sandboxes guide.
  • Validate option schemas locally with nix build .#checks.x86_64-linux.module-options-nixos and nix build .#checks.x86_64-linux.module-options-darwin.

Suggested Examples ​

  • hosts/modules/servers/minifluxng.nix
  • hosts/modules/servers/obligator.nix
  • hosts/modules/darwin/ollama.nix
  • hosts/modules/exporters/nvme.nix

For one full package -> module -> host walkthrough, see Case Study: poglets.

Complete Inventory ​

For the full generated list, see Generated Module Index.