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 24
24
./plugins.nix
25
25
] ;
26
26
27
- docs . options . options = {
27
+ docs . optionPages . options = {
28
28
enable = true ;
29
29
optionScopes = [ ] ;
30
30
} ;
Original file line number Diff line number Diff line change 16
16
./platforms.nix
17
17
] ;
18
18
19
- config . docs . options = {
19
+ config . docs . optionPages = {
20
20
docs = {
21
21
optionScopes = [ "docs" ] ;
22
22
page . menu . location = [ "docs" ] ;
Original file line number Diff line number Diff line change 18
18
optionsLists = builtins . groupBy ( opt : getPageFor opt . loc ) ( mkOptionList options ) ;
19
19
20
20
# 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 [
22
22
( lib . mapAttrsToList (
23
23
name : page : {
24
24
page = name ;
160
160
in
161
161
{
162
162
options . docs = {
163
- # TODO: can we name this something better than `options`?
164
- # Maybe `optionsPages`?
165
- options = lib . mkOption {
163
+ optionPages = lib . mkOption {
166
164
type = with lib . types ; lazyAttrsOf optionsPageType ;
167
165
description = ''
168
166
A set of option scopes to include in the docs.
177
175
_utils = {
178
176
inherit optionsPageModule ;
179
177
} ;
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
+ ) ;
182
182
} ;
183
183
}
Original file line number Diff line number Diff line change 47
47
in
48
48
{
49
49
options . docs = {
50
- platforms = lib . mkOption {
50
+ platformPages = lib . mkOption {
51
51
type = with lib . types ; lazyAttrsOf platformPageType ;
52
52
description = ''
53
53
A set of platform wrapper modules to include in the docs.
59
59
} ;
60
60
61
61
config . docs = {
62
- platforms = {
62
+ platformPages = {
63
63
"platforms/nixos" = {
64
64
page . menu . location = [
65
65
"platforms"
98
98
source = ../../docs/platforms/standalone.md ;
99
99
} ;
100
100
}
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
+ ) ;
103
105
} ;
104
106
}
Original file line number Diff line number Diff line change 13
13
prev ++ optional ( type == "directory" ) ( by-name + "/${ name } " )
14
14
) [ ] ( readDir by-name ) ;
15
15
16
- docs . options =
16
+ docs . optionPages =
17
17
let
18
18
mkPluginPages =
19
19
scope :
You can’t perform that action at this time.
0 commit comments