The Problem

Ever tried to debug or compare NixOS configurations? It's a nightmare. You can diff the derivations, sure, but that just gives you a mess of low-level garbage. Good luck figuring out why a certain package or option changed. If you want answers at the config level—what values were explicitly set, what dependencies influenced them—you're on your own. Until now.

What This Does

nixos-config-tui is a terminal-based UI for exploring and diffing NixOS configurations at the human-readable level. It doesn't just show you the end result; it traces back dependencies and lets you see exactly why a configuration looks the way it does.

The heavy lifting happens in src/resolve.rs and src/diff.rs, which handle dependency tracking and comparison. The TUI itself is built around src/tui.rs, with widgets and rendering logic tucked into src/tree/. The tool works with "tracked" configurations, which you generate using a patched version of Nix that outputs additional metadata (tracking.json, tracking-deps.json, etc.).

Once you've got your configuration, you can: Explore it (nixos-config show) to see all options and their dependencies. Diff two configurations (nixos-config diff) to compare changes at the config level. Narrow diffs down to explicitly defined values (--explicit).

It’s like having git diff for your NixOS configs but without the headache of scrolling through derivation junk.

Real-World Use

Imagine you're migrating a server from NixOS 23.05 to 25.11. You update your flake.nix and build the new system, but something's broken—your SSH config isn’t behaving. Instead of wasting hours sifting through derivations, you use nixos-config-tui:

The TUI shows that services.openssh.enable is still true in both configs, but in the new one, services.openssh.settings was overridden by some sneaky dependency. Now you know exactly where to look.

The Bottom Line

If you're serious about debugging NixOS configurations or tracking changes, this tool is a lifesaver. The TUI is fast, intuitive, and does exactly what you need without drowning you in derivation details. That said, setting up the patched Nix environment can be annoying, and the warning about "subtle bugs" means you should test this like your life depends on it. For production? Maybe not. For devs who love tinkering with Nix internals? Absolutely.