Search auxolotl packages and options. Forked from https://github.com/nixos/nixos-search
Go to file
dependabot[bot] a3c30a607a
Dependabot(deps): Bump cachix/install-nix-action from 13 to 14 (#354)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 13 to 14.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v13...v14)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-09 08:27:28 +02:00
.github Dependabot(deps): Bump cachix/install-nix-action from 13 to 14 (#354) 2021-09-09 08:27:28 +02:00
flake-info Strip leading slash from option sources (#348) 2021-08-26 09:43:23 +02:00
flakes Flake support/frontend (#324) 2021-08-26 00:40:42 +02:00
src Fix default group name (#353) 2021-08-28 11:42:36 +02:00
tests intial version of elm+webpack setup 2020-03-28 05:09:01 +01:00
.gitignore Rewrite import script in Rust (#320) 2021-08-17 10:55:08 +02:00
default.nix Adds faceted search (#261) 2021-01-23 17:25:43 +01:00
elm-srcs.nix remove suggestions feature (#141) 2020-07-24 23:01:16 +02:00
elm.json remove suggestions feature (#141) 2020-07-24 23:01:16 +02:00
flake.lock Remove python import script (#346) 2021-08-26 09:41:39 +02:00
flake.nix Remove python import script (#346) 2021-08-26 09:41:39 +02:00
netlify.toml a single page app and want history pushstate to work so you get clean URLs (#9) 2020-05-09 00:44:52 +02:00
overlay.nix Rewrite import script in Rust (#320) 2021-08-17 10:55:08 +02:00
package.json switch from sass to less (css) (#167) 2020-08-28 13:59:21 +02:00
README.md removing ideas from the README.md since we already have them in tickets 2020-12-18 14:10:14 +01:00
registry.dat Suggestions for search field (#74) 2020-07-02 14:27:49 +02:00
VERSION Flake support/frontend (#324) 2021-08-26 00:40:42 +02:00
versions.dat remove suggestions feature (#141) 2020-07-24 23:01:16 +02:00
webpack.config.js Add OpenSearch specifications for both packages and options. (#190) 2020-09-15 10:58:53 +02:00
yarn.lock switch from sass to less (css) (#167) 2020-08-28 13:59:21 +02:00

search.nixos.org

This repository contains the scripts and the web application for search.nixos.org.

How this project came to be

Initial idea was to replace NixOS packages and options search which was fetching one JSON file which contained all packages (or options). This approach is good for its simple setup, but started to show its problems when packages number was getting bigger and bigger. I'm sure we could optimize it further, but ideas what all could we do if there would be some database in the back were to tempting not to try.

For backend we are using Elasticsearch instance which is kindly sponsored by bonsai.io. On the frontend we are using Elm.

How search works?

The use case we want to solve is that a visitor want to see if a package exists or to look up certain package's details.

A user wants to converge to a single result if possible. The more characters are added to a search query the more narrow is search is and we should show less results.

Very important is also ranking of search results. This will bring more relevant search results to the top, since a lot of times it is hard to produce search query that will output only one result item.

A less important, but providing better user experience. are suggestions for writing better search query. Suggesting feature should guide user to write better queries which in turn will produce better results.

Development

To start developing open a terminal and run:

$ nix-shell --run "yarn dev"

You can point your browser to http://localhost:3000 and start developing. Any changes to source files (./src) will trigger a hot reload of an application.

Deploying

  • On each commit to main branch a GitHub Action is trigger.
  • GitHub Action then builds production version of the web application using yarn prod command.
  • The built web application (in ./dist) is then deployed to Netlify.
  • GitHub Action can also be triggered via Pull Request, which if Pull Request was created from a non-forked repo's branch, will provide a preview url in a comment.