Skip to content

Commit de1341f

Browse files
committed
modules/docs: options -> optionPages
1 parent 27279cf commit de1341f

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

modules/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
./plugins.nix
2525
];
2626

27-
docs.options.options = {
27+
docs.optionPages.options = {
2828
enable = true;
2929
optionScopes = [ ];
3030
};

modules/docs/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
./platforms.nix
1717
];
1818

19-
config.docs.options = {
19+
config.docs.optionPages = {
2020
docs = {
2121
optionScopes = [ "docs" ];
2222
page.menu.location = [ "docs" ];

modules/docs/options.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let
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;
@@ -160,9 +160,7 @@ let
160160
in
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.
@@ -177,7 +175,9 @@ in
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
}

modules/docs/platforms.nix

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ let
4747
in
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.
@@ -59,7 +59,7 @@ in
5959
};
6060

6161
config.docs = {
62-
platforms = {
62+
platformPages = {
6363
"platforms/nixos" = {
6464
page.menu.location = [
6565
"platforms"
@@ -98,7 +98,9 @@ in
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
}

modules/plugins.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ in
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:

0 commit comments

Comments
 (0)