Searchix: web-based option/package search including nix-darwin and home-manager

Ever wished to have something like search.nixos.org for nix-darwin or home-manager packages? I have, so I wrote it!

Searchix is in alpha, but since I’ve been using it more than I’ve been working on it lately, I thought that it’s probably a good time to announce it.

Anti-JavaScript users can rejoice, because it works without it. There’s a few little enhancements if it’s enabled.

I wrote a blog post with some more details.

23 Likes

Honestly, I’m not sure I don’t prefer your UI / look-and-feel to search.nixos.org’s! Fast, simple, uncluttered :)

1 Like

Looks cool! I personally think that combining the different searches into one output with visual distinction between the sources could be of some use. I find myself often looking at packages → options → home-manager to see what exists. Kind of like mynixos.com does it

5 Likes

Yep, that’s something I’ve thought about a bit and is technically possible, I just need to work on a UI for it!

1 Like

It would also be cool if there was a “universal” search bar which would aggregate the options from all the sources and mark or color-code them with the source they are coming from, like so:

hyprland

  • hyprland - Nixpkgs package
  • programs.hyprland.enable - Nixos
  • wayland.windowManager.hyprland.enable - Home manager
1 Like

Great work! I’ve been missing having something like this for Darwin and Home Manager that would work with Firefox search shortcuts.

I second the request for a universal search across all of the sources.

1 Like

I’ve added a combined search. It was easier than I thought (I’d been putting it off for a while).

Also, there was a bug with the browser search engine descriptors that should be fixed as well.

Enjoy!

5 Likes

Love to see this! [p a d d i n g]

1 Like

Thank you for this!

It looks like the search is case sensitive, is that on purpose?

1 Like

It shouldn’t be case-sensitive per se, but what I did set up is that camel-case words are split, so virtualHosts and virtual-hosts are the same.
I think that there’s still room for improvement there, but haven’t gotten around to it yet: I think this splitting should only happen in the indexing and not with the user query, that would probably improve it

1 Like

See how Searchix and Searchix return a different set of results.

I noticed this when I first tried to search on my phone, which automatically made the first letter uppercase, and I wondered why there wasn’t more than one result. That can by the way be disabled via the autocapitalize setting on the input field.

1 Like

oh, that’s very interesting and unexpected. I’ll add the autocapitalize attribute for now as a quick fix and look into the case sensitivity when I have a bit more time and energy. Thanks for the details and the tip!

2 Likes

Thanks for creating this!

What about adding a favicon (e.g., a NixOS logo), so that we can quickly find it when adding it to the Firefox search bar?

2 Likes

Good idea. I didn’t think about using the pre-existing logos for that!

1 Like

Please don’t use the logo for just anything related to Nix. It makes it hard to discern between what’s part of the core ecosystem (“official”) and what isn’t. You can use a clearly distinguishable variant of the logo, i.e. one with a altered shape and color.

Searchix is a great idea and all, and my intention is not to put obstacles in your way. Please keep going, we need more people doing cool new things! It’s just that we have a history of inappropriate use of brand identity that has repeatedly lead to confusion. And it’s not like things aren’t confusing enough with all sorts of things having “Nix” in it’s name.

In case you and others want to make it “official”, let’s instead take the opportunity and set an example of how to do it well: you could start by checking with stakeholders of similar projects (search.nixos.org) how to go about it, and then see from there.

1 Like

That’s a fair point. I might use them more for inspiration then!

1 Like