Skip to content

NixOS Module

  • NixOS with flakes enabled
  • Access to the Oriel flake
  • PostgreSQL, ClickHouse, and Valkey either local or external

Enable the module:

{
inputs.oriel.url = "path:/path/to/oriel";
outputs = { self, nixpkgs, oriel, ... }: {
nixosConfigurations.host = nixpkgs.lib.nixosSystem {
modules = [
oriel.nixosModules.oriel
{
services.oriel = {
enable = true;
settings = {
server.http_addr = ":6743";
ingest.grpc_addr = ":4317";
ingest.http_addr = ":4318";
clickhouse.dsn = "clickhouse://oriel:oriel@localhost:9000/oriel";
metadata.dsn = "postgres://oriel:oriel@localhost:5432/oriel";
valkey.dsn = "valkey://localhost:6379/0";
};
};
}
];
};
};
}

For secrets, prefer:

services.oriel.configFile = "/etc/oriel/oriel.toml";

Inline services.oriel.settings is rendered into the Nix store and should not hold secrets.

Optional local dependencies:

services.oriel.clickhouse.enable = true;
services.oriel.postgresql.enable = true;

Configure Valkey separately and point services.oriel.settings.valkey.dsn at that instance, or use an externally managed Valkey endpoint.

Optional firewall opening:

services.oriel.openFirewall = true;
Terminal window
systemctl status oriel-migrate.service
systemctl status oriel.service
curl -fsS http://localhost:6743/readyz

Use normal NixOS generation rollback for package and unit changes. If schema migrations have already been applied, do not roll back to a binary that expects an older schema unless you have a tested database rollback path.