Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Searchability for plasma-manager options #192

Open
Asqiir opened this issue Jun 6, 2024 · 10 comments
Open

Searchability for plasma-manager options #192

Asqiir opened this issue Jun 6, 2024 · 10 comments

Comments

@Asqiir
Copy link
Contributor

Asqiir commented Jun 6, 2024

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?)

@magnouvean
Copy link
Collaborator

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

@Asqiir
Copy link
Contributor Author

Asqiir commented Jun 9, 2024

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.

@magnouvean
Copy link
Collaborator

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.

@ede1998
Copy link

ede1998 commented Jul 21, 2024

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.

@Asqiir
Copy link
Contributor Author

Asqiir commented Jul 21, 2024

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

@magnouvean
Copy link
Collaborator

magnouvean commented Jul 21, 2024

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.

@magnouvean
Copy link
Collaborator

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.

@magnouvean
Copy link
Collaborator

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).

@ede1998
Copy link

ede1998 commented Jul 30, 2024

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).

@joelishness
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants