File tree Expand file tree Collapse file tree 5 files changed +15
-13
lines changed Expand file tree Collapse file tree 5 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 2424 ./plugins.nix
2525 ] ;
2626
27- docs . options . options = {
27+ docs . optionPages . options = {
2828 enable = true ;
2929 optionScopes = [ ] ;
3030 } ;
Original file line number Diff line number Diff line change 1616 ./platforms.nix
1717 ] ;
1818
19- config . docs . options = {
19+ config . docs . optionPages = {
2020 docs = {
2121 optionScopes = [ "docs" ] ;
2222 page . menu . location = [ "docs" ] ;
Original file line number Diff line number Diff line change 1818 optionsLists = builtins . groupBy ( opt : getPageFor opt . loc ) ( mkOptionList options ) ;
1919
2020 # A list of { page, scope } pairs, sorted by scope length (longest first)
21- pageScopePairs = lib . pipe config . docs . options [
21+ pageScopePairs = lib . pipe config . docs . optionPages [
2222 ( lib . mapAttrsToList (
2323 name : page : {
2424 page = name ;
160160in
161161{
162162 options . docs = {
163- # TODO: can we name this something better than `options`?
164- # Maybe `optionsPages`?
165- options = lib . mkOption {
163+ optionPages = lib . mkOption {
166164 type = with lib . types ; lazyAttrsOf optionsPageType ;
167165 description = ''
168166 A set of option scopes to include in the docs.
177175 _utils = {
178176 inherit optionsPageModule ;
179177 } ;
180- # Define pages for each "options" attr
181- pages = builtins . mapAttrs ( _ : cfg : cfg . page ) ( lib . filterAttrs ( _ : v : v . enable ) config . docs . options ) ;
178+ # Define pages for each "optionPages" attr
179+ pages = builtins . mapAttrs ( _ : cfg : cfg . page ) (
180+ lib . filterAttrs ( _ : v : v . enable ) config . docs . optionPages
181+ ) ;
182182 } ;
183183}
Original file line number Diff line number Diff line change 4747in
4848{
4949 options . docs = {
50- platforms = lib . mkOption {
50+ platformPages = lib . mkOption {
5151 type = with lib . types ; lazyAttrsOf platformPageType ;
5252 description = ''
5353 A set of platform wrapper modules to include in the docs.
5959 } ;
6060
6161 config . docs = {
62- platforms = {
62+ platformPages = {
6363 "platforms/nixos" = {
6464 page . menu . location = [
6565 "platforms"
9898 source = ../../docs/platforms/standalone.md ;
9999 } ;
100100 }
101- # Define pages for each "platforms" attr
102- // builtins . mapAttrs ( _ : cfg : cfg . page ) ( lib . filterAttrs ( _ : v : v . enable ) config . docs . platforms ) ;
101+ # Define pages for each "platformPages" attr
102+ // builtins . mapAttrs ( _ : cfg : cfg . page ) (
103+ lib . filterAttrs ( _ : v : v . enable ) config . docs . platformPages
104+ ) ;
103105 } ;
104106}
Original file line number Diff line number Diff line change 1313 prev ++ optional ( type == "directory" ) ( by-name + "/${ name } " )
1414 ) [ ] ( readDir by-name ) ;
1515
16- docs . options =
16+ docs . optionPages =
1717 let
1818 mkPluginPages =
1919 scope :
You can’t perform that action at this time.
0 commit comments