INFRA Signal 410
NixOS systemd timer schedules can be inspected at build time via nix eval
Illustration only Photo by Mario Gogh on Unsplash
A NixOS user demonstrates extracting systemd timer configurations from the system derivation at build time using `nix eval --json`, avoiding the need to deploy before checking scheduled jobs.
For engineers managing multiple NixOS hosts with growing numbers of systemd timers, build-time inspection means you can catch scheduling conflicts or misconfigured jobs before they reach production. The approach relies on NixOS producing a fully inspectable derivation that includes the systemd configuration, so it costs nothing beyond the existing build pipeline.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The author uses `nix eval --json` with `--apply` to extract `timerConfig` from `nixosConfigurations` and pipe it through `jq` for structured output.
The extracted JSON reveals all timer settings such as `OnCalendar`, `Persistent`, and `RandomizedDelaySec` without deploying the system.
A Python script converts the extracted timer data into a Mermaid flow diagram visualizing each server's schedule.
THE CLUSTER