Pipe your nix-build output through the nix-output-monitor a.k.a nom to get additional information while building.
Go to file
2022-09-29 13:35:23 +02:00
bench Add profiling scripts 2022-09-28 23:32:03 +02:00
completions Add nom-build with zsh completion 2022-03-16 13:52:47 +01:00
exe Reformat 2022-09-25 07:48:26 +02:00
lib/NOM Reformat 2022-09-25 07:48:26 +02:00
test Reformat 2022-09-25 07:48:26 +02:00
.envrc Add .envrc 2022-03-08 02:06:21 +01:00
.gitignore git ignore recorded profiles 2022-09-29 13:35:23 +02:00
.hlint.yaml Refactor to avoid expensive calculations in STM atomic transactions 2022-06-17 14:16:18 +02:00
cabal.project.local Add weeder config and drop unused functions 2022-03-05 20:24:58 +01:00
CHANGELOG.md Release 2022-03-21 22:46:51 +01:00
default.nix Reformat 2022-03-08 14:06:53 +01:00
example-screenshot.png Add example-screenshot.png 2022-03-08 15:26:12 +01:00
flake.lock Bump nixpkgs 2022-09-25 07:48:18 +02:00
flake.nix Add profiling scripts 2022-09-28 23:32:03 +02:00
fourmolu.yaml Reformat with fourmolu 2021-02-20 19:17:44 +01:00
hie.yaml Check in hie.yaml 2022-03-05 20:21:48 +01:00
LICENSE Initial commit 2020-10-03 16:06:03 +02:00
nix-output-monitor.cabal Update maintainer 2022-09-25 07:50:51 +02:00
README.md Improve README 2022-03-08 21:43:53 +01:00
weeder.dhall Clean up 2022-03-06 03:06:19 +01:00


Pipe your nix-build output through the nix-output-monitor (aka nom) to get additional information while building.

While your build runs nom will draw something like this at the bottom of your build log:

Packaging status


This was an experimental fun project, which proofed to be useful to quite a lot of people. The purpose of it is to write something fun and useful in Haskell. You are free and very welcome to contribute feedback, issues or PRs, but I do not commit to maintain this project over a long time period. This program relies on the output of the v1 nix commands (i.e. nix-build and not nix build) support for v2 output may come in the future.


  • nixpkgs: nom is in nixpkgs. Just install pkgs.nix-output-monitor in the usual way. You might want to install it from nixos-unstable to get the newest version.
  • cabal: Install cabal-install and run cabal install in the checked out repo.
  • nix: or run nix-build or nix-env or include the default.nix of this repo in your nixos config.


The Easy Way

When installed from nixpkgs you can replace every call to nix-build with the bundled wrapper script nom-build.

The Flexible Way

Once you have installed nix-output-monitor to your path, run any nix command (nixos-rebuild,nix-build,home-manager switch, not nix build.) and pipe stderr and stdout into nom.

nix-build |& nom

Dont forget to redirect stderr, too. That's what the &, does.

Preserving Colored Text

To preserve the color of the redirected text you can use the unbuffer command from the expect package. (The nom-build wrapper does this for you.)

unbuffer nix-build |& nom



Nom tries to convey informations via symbols and colors

  • ▶, yellow: running builds
  • ✔, green: completed builds
  • , blue: planned builds
  • ⬇, cyan: downloads often in the form completed/total
  • ⬆, magenta: uploads
  • ⚠, red: failed builds
  • ∅: a moving average over past builds of this derivation
  • ⏱︎: running time
  • ∑: a summary over all packages and hosts

If you cant see all icons you maybe need another terminal font. I recommend any font from pkgs.nerdfonts e.g. "JetBrainsMono Nerd Font". Also different terminals might work differently well. I recommend: pkgs.foot.

How to Read the Dependency Graph

  • nom will sort all builds into a tree.
  • Children of a node are direct dependencies.
  • nom will try to show you the most relevant part of the dependency tree, roughly aiming to fill a third of your terminal
  • No build will be printed twice in the tree, it will only be shown for the lower most dependency.
  • Everytime nom decides to not show all direct dependencies of a build (and for root nodes), it will print a & and a summary over the build state of all dependencies.
  • Use the colors from above to read the summary

Example Runs

An example remote build: asciicast

An example failing remote build: asciicast

An example really large build (haskell-language-server): asciicast

An example running sudo nixos-rebuild switch: asciicast


Right now nom uses four sources of information:

  1. The parsed nix-build output
  2. it checks if build results exist in the nix-store
  3. it querys .drv files for information about the out output path.
  4. It caches build times in $XDG_CACHE_HOME/nix-output-monitor/build-reports.csv.


  • This will fail in unexpected and expected ways.

  • nix-output-monitor receives most it's information from parsing nix-build output. The parser might be to strict or to loose for use cases I didnt think of. Then the numbers displayed will be off!

  • nix-build does not show info when a download or upload is finished, so we currently cannot differentiate between started and completed downloads.

  • remote builds will sometimes be shown as running even when they are actually still waiting for uploads or downloads.

  • Terminal clearing and reprinting is brittle. It might fail with your terminal or terminal width. But at this point Ive invested some effort to make it usable.

  • This program also makes assumptions like your nix-store is at "/nix/store" or that every derivation has an output at "out".

  • Luckily I dont think this program screws up anything more than your terminal.