Modules
System modules under hosts/modules let hosts share options, service wiring, and defaults.
Module Areas
hosts/modules/confGeneral configuration helpers used by hosts.hosts/modules/darwinnix-darwin launchd and service modules.hosts/modules/exportersMonitoring-specific modules likenvme.hosts/modules/gamesGame server modules.hosts/modules/serversReusable 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.nixexportsnixosModules.agy-remote,nixosModules.codex-remote, andnixosModules.claude-code-remotefor external consumers, backed by evaluation and VM tests intests/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-nixosandnix build .#checks.x86_64-linux.module-options-darwin.
Suggested Examples
hosts/modules/servers/minifluxng.nixhosts/modules/servers/obligator.nixhosts/modules/darwin/ollama.nixhosts/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.