StackPanel

doctor

Configuration options for stackpanel.doctor

Doctor Options

stackpanel.doctor.<module>.<name> is the single place a module declares a check. Every check has a scope; two keys on each module (enable, displayName) are reserved for module metadata and everything else is a check.

ScopeObservesConsumed by
builda derivation that must buildnix flake check (via moduleChecksFlattened), stack doctor --build
runtimemachine state outside the repo (tools, caches, services)agent API / studio traffic lights (via healthchecksList), stack healthcheck, stack doctor
repothe repository itselfstack doctor

The doctor observes. It never installs and never writes. Repo state is fixed by reconciliation (stack setup), so a repo check never needs a fix command; runtime checks may carry a fixCommand hint that is shown, never run.

moduleChecksFlattened, moduleChecksCertification, healthchecksComputed and healthchecksList are read-only views over this option, byte-identical to what the former moduleChecks and healthchecks.modules options produced.

doctor

PropertyValue
Typeattribute set of (submodule)
Default{ }

Example:

{
  playwright = {
    displayName = "Playwright";
    browsers = {
      scope = "runtime";
      severity = "warning";
      script = "test -d \"$HOME/.cache/ms-playwright\"";
      fixCommand = "bunx playwright install";
    };
    eval = {
      scope = "build";
      required = true;
      derivation = pkgs.runCommand "playwright-eval" {} "touch $out";
    };
  };
}

doctor.<module>.enable

Enable every check registered under this module key.

PropertyValue
Typeboolean
Defaulttrue

doctor.<module>.displayName

Display name for this module's health summary in the UI.

PropertyValue
Typestring
Defaultthe module key

doctor.<module>.<name>.scope

What the check observes: build, runtime or repo.

PropertyValue
Typeone of "build", "runtime", "repo"
Default"runtime"

doctor.<module>.<name>.severity

How failure affects the module aggregate status: critical (red), warning (yellow), info (reported only).

PropertyValue
Typeone of "critical", "warning", "info"
Default"warning"

doctor.<module>.<name>.fixCommand

Command the user can run to fix a failing runtime check. Shown verbatim in reports; never executed.

PropertyValue
Typenull or string
Defaultnull

doctor.<module>.<name>.type

Detector for runtime and repo checks: script (exit 0 is healthy), nix (nixExpr evaluates to true), http (httpUrl returns httpExpectedStatus), tcp (tcpHost:tcpPort accepts a connection).

PropertyValue
Typeone of "script", "nix", "http", "tcp"
Default"script"

The script sources (script, path, scriptRef, scriptPackage), the HTTP and TCP fields, timeout, interval and tags are the same as the former healthcheck options. timeout defaults to 300 seconds for build checks and 10 otherwise.


doctor.<module>.<name>.derivation

For scope = "build": the derivation that must build successfully. Exposed as checks.<system>.<module>-<name>.

PropertyValue
Typenull or package
Defaultnull

doctor.<module>.<name>.required

For scope = "build": whether this check is required for module certification. A module is certified when it declares both an eval and a packages check.

PropertyValue
Typeboolean
Defaultfalse

doctorList

Read-only. Flat list of every enabled module's checks across all scopes, serialized for stack doctor. Runtime and repo entries carry the same Healthcheck wire shape as healthchecksList plus scope and fixCommand; build entries carry checkName and drvPath.

On this page