/search

Simple and fast static-page NixOS option search

Primary LanguageTypeScriptMIT LicenseMIT

NüschtOS Search

Simple and fast static-page NixOS option search

Deployments

How to use

Until we have written proper instructions please take a look at the following examples:

Motivation

We wanted something similar to https://search.nixos.org to easily search through all the flakes options across many projects we accumulated in projects but without the need to deploy an Elasticsearch. Ideally it should be just a static site with json blob that can be deployed on GitHub pages.

Debugging

Generating a options.json in a nix repl can be done with the following snippet:

:b (pkgs.nixosOptionsDoc { inherit ((lib.evalModules { modules = [ { config._module.check = false; } outputs.nixosModules.default ]; })) options; warningsAreErrors = false; }).optionsJSON

It is assumed that the flake was loaded before with :lf and the module(s) is/are under nixosModules.default. For some flakes this may need to be adapted.