Open Asqiir opened 3 months ago
I would say it is in scope, though at least nixos options search is probably more work than at least I have time for. I haven't heard about mynixos
before, but maybe if it's not too difficult to set up (I'm assuming it is quite easy) we could maybe get it up there. I'll certainly check that out
I looked up the official nixos search. It's this project.
The readme has a section on adding own flakes, although I cannot decipher whether that means "to the official setup" or "in your own installation".
If it's the first – and if (a big if) plasma-manager is in scope for them – that might be our solution.
Looking at how it works it looks to be the the first indeed. We can see if they are open to adding it there (the only objection I can see is that plasma-manager
probably has a lot more options than the other flakes there currently). Even if that wouldn't work we could maybe try to add it in a fork, but that is dependent on it being possible to host on github.io
. If none of those options are available we'll probably have to do with just mynixos
.
I'd love to see that feature.
Another idea: Home-Manager generates a large html page with all the available options. This would still be searchable with the browser built-in search.
In the code that does not look too complex and should be easily hostable with Github pages: https://github.com/nix-community/home-manager/blob/master/docs/default.nix#L57 (permalink)
Sadly, I'm not well versed in nix or I'd give it a try myself.
One thing I learned only recently: how incredibly good the github search in-repo search is (press / and then search for some option). This apparently means that lots of devs don't have the need for nixos-search and thus there isn't a whole lot of pressure for its implementation
Yeah the github in-repo search, or simply searching globally on github (using lang:nix) to check other peoples configs is probably mostly what's needed in a lot of cases. We should have some kind of options search/documentation page. Using search.nixos.org
still probably is a possibility, though they seem to have a few problems with the flake page lately, and I just haven't prioritized it at the moment. I will look into it though when I get time. The docs generation mentioned above looks nice though, and I think it would be quite helpful to include as well, so I'll check that out. In the best case we could have support for both, or at the very least one of these solutions, as that would probably make it easier to find the options that is supported.
OK so I've been testing the html solution and I've seem to have gotten something working here (although it's taken quite a long time to figure out due to very limited documentation). Adding this also opens up for extending the options page with a more detailed manual (adding more pages should be as easy as adding some more pages to the markdown file). I can probably get out at least a pr (and maybe even merge the documentation) within the next couple of days, so others don't need to worry about trying to implement it.
The only downside is that the full options page is quite big, but we can maybe worry about finding a more optimal solution/structure after a while. Maybe even we could even create a fork of the home-manager search since I believe this only really requires some json-file of the options, which is already generated in the module which creates the options page.
The options can now be viewed in the options section in the new manual. This isn't necessarily a search-engine though, just a list of all valid options, so I'll keep the issue open (for now anyway).
Thank you so much! I really appreciate it.
For me personally, being able to just open the docs in the browser and searching with CTRL+F
is already plenty. Much more convenient than scouring through nix code with Github search (which also requires login to see code results).
I found out about the options section in the new manual from word of mouth. Was looking for something like it but couldn't find it on my own.
Submitted a PR #325 to add it to the README for discoverability.
I'd like to have better searchability of our config options. How hard would it be to set up something like the nixos options search or get added to mynixos search? (Is that even in-scope?)