Easy search mechanism for nix manuals, built on fzf
Go to file
h7x4 51ab2cf393
docbook2txt: halfway finish `<informaltable>`
This required a lot of restructuring, which is why I won't
put this on another branch.

A part of the library which is updated in github but not yet at hackage,
is needed to continue. Specifically, the `Monoid` instance in
`Text.Layout.Table.Cell.Formatted` is needed to put together multiple
colored text in a table.

Among other things introduced, there is now our own `Formatted` type
which is used to await formatting until things like tables come up.
Compared to the earlier `IO ()` approach, this is probably a lot better.
2022-11-30 20:26:36 +01:00
internals docbook2txt: halfway finish `<informaltable>` 2022-11-30 20:26:36 +01:00
searchers docbook2txt: rename `xmldoc2txt` to `docbook2txt` 2022-11-29 23:16:52 +01:00
templates naming consistency: `nix-attrs-*` -> `nix-attr-*` 2022-11-26 21:01:29 +01:00
utils naming consistency: `nix-attrs-*` -> `nix-attr-*` 2022-11-26 21:01:29 +01:00
.gitignore Initial commit 2022-11-24 20:09:31 +01:00
LICENSE Initial commit 2022-11-24 20:09:31 +01:00
README.md nix-option-search: Init 2022-11-26 06:35:58 +01:00
default.nix Restructure project: 2022-11-26 05:14:14 +01:00
flake.lock Initial commit 2022-11-24 20:09:31 +01:00
flake.nix docbook2txt: rename `xmldoc2txt` to `docbook2txt` 2022-11-29 23:16:52 +01:00
shell.nix shell.nix: print aliases on starting nix-shell 2022-11-29 16:16:47 +01:00

README.md

Nix Attr Search

NOTE: This is still in alpha

These are some tools i made for ease of searching for stuff while writing my nix configs.

They are made with fzf, so they can easily be piped into other programs.

Also, they all create a derivation containing all of the attributes.


Try it out!

Nix Packages

TODO:

Nix Options

NOTE: This is mostly a copypaste of home-manager-search. The documentation structure for home-manager-search and nix-option-search differ slightly, but they are similar enough that the copypaste version is kind of usable. I will fix up this in the future, but for now I am focusing on squashing the bugs within home-manager-search.

nix run github:h7x4/nix-attr-search#nix-option-search

Or a more advanced version:

nix run github:h7x4/nix-attr-search#nix-option-search -- --flake="github:NixOS/nixpkgs" --ref="nixos-22.05"

Homemanager

nix run github:h7x4/nix-attr-search#home-manager-search

Or a more advanced version:

nix run github:h7x4/nix-attr-search#home-manager-search -- --flake="github:nix-community/home-manager" --ref="release-22.05"

Some piping ideas

Misc

  • Pipe the option into the clipboard
  • Bind shortcut keys to open a terminal with the program, and paste the chosen option directly into the current program (probably a code editor of some sort, with your nix configs open).

Repiping values into jq

  • Repipe the chosen value into jq, and choose either the default value, the example value.
  • Repipe the chosen value into jq, choosing its referenced configs, pipe these into fzf once more to choose one referenced config, then pipe this relative file path into rg to (hopefully) find the specific location the value was set, and then open the file at its specific position in an editor.