Nix-inspect: a TUI for browsing nix configs and other expressions

A lot of the time my workflow using nixos would involve running a series of commands to find the final merged result of my config:

❯ : nix repl
nix-repl> :lf /etc/nixos
Added 18 variables.
nix-repl> nixosConfigurations.felys.config.home-manager.users.blusk.stylix.fonts.monospace.name
"Cozette"

nix-inspect aims to improve on this workflow by offering a interactive way to browse a config and offering quality of life features such as bookmarks and a path navigator mode to get where you need quickly.

It loads your nix config by default, but supports exploring arbitrary nix values with the --expr flag.

Check out the project here!

64 Likes

legit looked for something like this few days ago, tysm!

2 Likes

It looks nice. Such a tool would be definitely useful. What looks confusing is that attrsets are shown as lists (in the title of the right panel).

1 Like

i just pushed out a fix that makes them distinguishable in the title, thanks for the input!

1 Like

Great tool. Please add it to nixpkgs. I am happy to review the PR. Thank you.

5 Likes

now in nixpkgs as of nix-inspect: init at 0.1.0 by bluskript · Pull Request #303512 · NixOS/nixpkgs · GitHub

3 Likes

Thank you for this!

I was close to start writing my own tool for this. In our company, we have quite a few students which stay only for 6 months and its challenging to learn to use Nix and NixOS in this short time. This will certainly be a great help :slight_smile:

1 Like