Skip to content

Commit

Permalink
Merge branch 'main' of github.com:bluskript/nix-inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
bluskript committed Apr 10, 2024
2 parents aad35e2 + 5f0fa0d commit c8efe50
Showing 1 changed file with 36 additions and 24 deletions.
60 changes: 36 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,34 @@
# nix-inspect
Interactive nix config viewer

A ranger-like TUI for inspecting your nixos config and other arbitrary nix expressions.

```
nix run github:bluskript/nix-inspect
```

https://github.com/bluskript/nix-inspect/assets/52386117/a18c6038-f954-451b-a8cd-26b30a197165

### Features
- 🪡 Path navigator to quickly type in or paste a path which live updates as you type
- 🔍Fuzzy search in the current directory
- 🔖 Bookmarks to save important nix paths, automatically populated with your current system and user
- ⌨️ Vim keybindings
- (planned) 🕑 Recently visited paths tab
### Motivation

### Installation
As of now the project remains unpackaged in `nixpkgs`, so the recommended installation method is through flakes:
```nix
{
inputs = {
nix-inspect.url = "github:bluskript/nix-inspect";
};
}
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:
```
and then reference it in your `environment.systemPackages`:
```nix
{inputs, ...}: {
environment.systemPackages = [
inputs.nix-inspect.packages.default
];
}
❯ : 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.

### Features
- 🪡 Path navigator to quickly type in or paste a path which live updates as you type (.)
- Supports tab completion!
- 🔍Fuzzy search in the current directory (Ctrl-F or /)
- 🔖 Bookmarks to save important nix paths, automatically populated with your current system and user (s)
- ⌨️ Vim keybindings (hjkl, ctl+u, ctrl+d)
- (planned) 🕑 Recently visited paths tab

### Usage

By default, `nix-inspect` will try to load your config where it is, by default this will be /etc/nixos if you are using flakes or the path in NIX_PATH if you are using legacy. If this behavior is not what you want, `nix-inspect` comes with some flags:
Expand All @@ -54,6 +51,21 @@ By default, `nix-inspect` will try to load your config where it is, by default t
| s | Save bookmark |
| . | Path Navigator mode |

### Known Issues / TODO

- Search / path navigator ui needs to be more visible
### Installation
As of now the project remains unpackaged in `nixpkgs`, so the recommended installation method is through flakes:
```nix
{
inputs = {
nix-inspect.url = "github:bluskript/nix-inspect";
};
}
```
and then reference it in your `environment.systemPackages`:
```nix
{inputs, ...}: {
environment.systemPackages = [
inputs.nix-inspect.packages.default
];
}
```

0 comments on commit c8efe50

Please sign in to comment.