NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.97k stars 13.98k forks source link

Documentation: No example is provided for using disabledModules with an attribute set #343792

Open llakala opened 1 month ago

llakala commented 1 month ago

Problem

The documentation on disabledModules describes three different ways to interact with disabledModules. However, no example is provided for the last method: using an attribute set.

This is specifically problematic because the documentation mentions a feature exclusive to this method ("The latter allows some modules to be disabled, despite them being distributed via attributes instead of file paths. The key should be globally unique, so it is recommended to include a file path in it, or rely on a framework to do it for you.").

Proposal

An example would be provided for how to use this. I would write the example myself, but I still don't understand how exactly it would look. If anyone is more knowledgeable on how using an attribute set within disabledModules works, I'd appreciate you letting me know, so I can make a PR myself.

Checklist


Add a :+1: reaction to issues you find important.

llakala commented 1 month ago

Found a relevant PR with some additional info that clears things up a lot. I think the documentation could ideally be clarified a bit, since this conversation was much clearer than the documentation in my opinion.