---
# System prepended metadata

title: Nix Documentation / Search Engine

---

# Nix Documentation / Search Engine

Current interesting resources:
 - Nix manpages
 - man configuration.nix (`nix-build nixos/release.nix -A manual.$platform`)
 - NixOS module documentation (`$nixpkgs/nixos/modules/**/*.xml`)
 - Nixpkgs documentation (`$nixpkgs/nixos/doc/manual/**`)
 - nixpkgs package 
 - Nix manual (`$nix/doc/manual`)
     - nixops, disnix, etc etc manuals
 - Git commit messages / contents? (https://stackoverflow.com/questions/3826748/how-to-search-in-commit-messages-using-command-line/3826800)
 - IRC logs ( https://logs.nix.samueldr.com/nixos/2019-10-27 )
     - runs on whitelogger
 - New wiki, old wiki(s)

## Representation
We have all the data available. Searching might be less work if we make sure it's easily accessible, maybe some website rendering (all the) docs with a search bar will already check a lot of the boxes.

## possible search implementations
 - (fast) grep
 - yacy
 - elasticsearch
 - searx (meta?)


---
# zimbatm's dump

# Demo

* Hello
* World ${linkTo "id"}

* ${nixosOption "nginx.enable"}

## TODO

* Link to NixOS option
* Make sure we have stable anchors
* Link to inter-link to her sections of the documentation
* Verify doc examples
* Interactive nix repl dialog for examples
* shell prompt hiding for selection

```shell
> echo hello
```


## Arguments

* renders on GitHub
* extensible?
* fast
* small closure size


## Emacs

TexInfo integration


## Ideas

Annotations of functions for documentation



## Formats

* AsciiDoc
* TexInfo
* Markdown + extensions

