Skip to content

Commit f7fd879

Browse files
committed
modules/docs: use pipe for option/platform pages
1 parent ee320b8 commit f7fd879

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

modules/docs/options.nix

+4-3
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ in
176176
inherit optionsPageModule;
177177
};
178178
# Define pages for each "optionPages" attr
179-
pages = builtins.mapAttrs (_: cfg: cfg.page) (
180-
lib.filterAttrs (_: v: v.enable) config.docs.optionPages
181-
);
179+
pages = lib.pipe config.docs.optionPages [
180+
(lib.filterAttrs (_: v: v.enable))
181+
(builtins.mapAttrs (_: cfg: cfg.page))
182+
];
182183
};
183184
}

modules/docs/platforms.nix

+4-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ in
9999
};
100100
}
101101
# Define pages for each "platformPages" attr
102-
// builtins.mapAttrs (_: cfg: cfg.page) (
103-
lib.filterAttrs (_: v: v.enable) config.docs.platformPages
104-
);
102+
// lib.pipe config.docs.platformPages [
103+
(lib.filterAttrs (_: v: v.enable))
104+
(builtins.mapAttrs (_: cfg: cfg.page))
105+
];
105106
};
106107
}

0 commit comments

Comments
 (0)