NixOS Module
Prerequisites
Section titled “Prerequisites”- 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;Verify
Section titled “Verify”systemctl status oriel-migrate.servicesystemctl status oriel.servicecurl -fsS http://localhost:6743/readyzRollback/Recover
Section titled “Rollback/Recover”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.