ODDC is a portable, normalized hardware knowledge base.
Its central rule is:
Every hardware fact, policy value, and implementation behavior has one authoritative owner.
See CONTRIBUTING.md before changing catalog data and
docs/WORKFLOW.md for channels, contribution rules and
the oddc command. docs/CONTRACT.md says what
consumers outside Nix can rely on. docs/SECURITY.md
shows how to report a security finding.
AI use is encouraged for contributions: point your assistant (Claude Code, Codex or your own) at docs/AI.md. Contributions whose AI drifted from those rules will most likely be rejected and have to be redone.
Canonical entities live under catalog/entities/. The registry contains
reusable classes, vendors, families, components, models, quirks, and
security findings. Every
entity has stable metadata and a data object; references inside data compose
the hardware graph. Device models reference reusable entities instead of
copying their facts.
Examples:
model/framework/laptop-13-amd-ryzen-7040
model/hp/zbook-x2-g4
Device identity, capabilities, validated quirks, and hardware policy belong in canonical entity data. The resolved representation is generated and is never a second editable source of truth.
Resolution runs from broadest to narrowest:
- referenced class/vendor/family/component entities
- device model data
- project override
- host override
Later values override earlier values at the same stable path. Project and host overrides change policy without modifying canonical hardware knowledge; a host override has higher precedence than a project override. Overrideable collections use keyed objects so their paths remain stable and explainable.
Hardware reality belongs under stable hardware and capability paths such as:
hardware.graphics.integrated.driver
hardware.network.wifi.primary.driver
capabilities.chargeThresholds
Configuration policy belongs under policy, for example:
policy.power.batteryProtection.shutdownPercent
policy.power.chargeThresholds.endPercent
policy.thermal.fanControl.policy.thermalEnterC
Validated compatibility workarounds are referenced through a model's quirks
object. The reusable quirk entity owns the parameters; operating-system
adapters implement only the generic semantic behavior.
Use oddc explain to inspect the final owner and override history.
catalog/ entities: classes, vendors, families, components, models, quirks
evidence/ append-only records of what was observed on real machines
schemas/ JSON schemas for entities and evidence
templates/ starting points for new entities
nixos/ the NixOS module and its capability and quirk modules
lib/ Nix functions that load and resolve the catalog
checks/ flake checks
pkg/oddc/ the Go library: load, validate, resolve, classify, fetch
cmd/oddc/ the `oddc` command, which only dispatches to internal/
internal/ the commands by use: system, catalog, contribute, and the
cli helpers they share
tests/ Go tests by package, on a shared fixture of this catalog
docs/ workflow, consumer contract, releases, security findings
tools/ contributor tools (debug, read-only), not part of the package
nix run github:JadeOpenServices/oddc -- validate --root .
or, as a Go library:
go get github.com/JadeOpenServices/oddc/pkg/oddc
On any machine, find and set up the matching model:
nix run github:JadeOpenServices/oddc -- detect
nix run github:JadeOpenServices/oddc -- setup
On a deployed system, check and update it:
oddc doctor
oddc update --switch
Contributors can follow staging to get merged models before a release:
oddc update --channel staging --switch
See docs/WORKFLOW.md for every command.
Validate the registry and evidence:
oddc validate --root .
List entities, optionally by kind:
oddc list --root . --kind DeviceModel
Resolve a model:
oddc resolve \
--root . \
--device model/framework/laptop-13-amd-ryzen-7040
Explain a value and its ownership:
oddc explain \
--root . \
--device model/framework/laptop-13-amd-ryzen-7040 \
--path hardware.network.wifi.primary.driver
ODDC exports one generic NixOS module. Device-specific Nix modules are avoided; quirk and capability adapters consume semantic resolved data rather than matching vendor, model, or quirk IDs.
# flake.nix
inputs.oddc.url = "github:JadeOpenServices/oddc";
# configuration
{
imports = [ inputs.oddc.nixosModules.default ];
oddc.device = "model/framework/laptop-13-amd-ryzen-7040";
}
A consumer selects a model only when the machine's DMI identity matches one; a machine without a match gets no model and so none of its capabilities, such as fan control. Units that drive hardware, like fan control, also skip virtual machines, which may inherit a host's model.
The selected model is available read-only through config.oddc.resolved.
Canonical model IDs are exposed through config.oddc.availableModels.
Machine-local policy changes belong under oddc.overrides, for example:
oddc.overrides.policy.thermal.fanControl.policy.thermalEnterC = 85;
Adding another ordinary device model must not require another public NixOS module.
The full catalog stays in the repository and in installers that select a
model. A deployed system receives only the selected model under /etc/oddc:
the model's reference closure in canonical layout, its evidence, the host
overlay (host-overlay.json, when oddc.overrides is set), resolved.json,
inactive-quirks.json (the kernel-ranged quirks the system's kernel does
not need) and, through the flake module, the ODDC revision. Other models never reach
the system closure. The oddc command is installed with it
(oddc.cli.enable) and defaults to /etc/oddc and the deployed model:
oddc list
oddc resolve
oddc explain --path policy.thermal.fanControl.policy.thermalEnterC
Set oddc.deploy.enable = false to deploy nothing.
Real-machine observations live under evidence/ as sanitized,
append-only validation records. Evidence records what was observed and tested;
it validates canonical knowledge but does not become another hardware catalog.
Serial numbers, MAC addresses, usernames, hostnames, and other identifying
machine data must not be stored in public evidence. oddc validate refuses
records that hold them: identifying keys anywhere in environment, values
that look like a MAC or IP address, UUID, machine ID, e-mail address or home
directory, an observedAt with a time of day, and results that are not
short statuses such as pass. oddc validate --since REV also refuses
evidence changed or removed since REV; pull requests are checked against
their base branch.
ODDC knows nothing about the systems that consume it. A consumer imports the
NixOS module or the Go package, selects a model, and supplies its own
behavior through options such as oddc.fanControl.controller.command.
GjallarOS vendors ODDC as a git subtree so its installer works offline.
Every merge to stable is a release; consumers pin it by commit hash. See
docs/RELEASES.md.
Work items live in the ODDC project on plane.openjade.de. See docs/WORKFLOW.md for how items, branches and commits fit together.
ODDC is free software under the GNU General Public License, version 3 or
any later version (GPL-3.0-or-later); see LICENSE. Anyone may
use, change and share it; changed versions that are shared must stay under
the same license with their source, and the license grants the
contributors' patents with it. Releases before this change were
Apache-2.0.