mirror of
https://git.gay/pyrox/aux-docs
synced 2024-10-30 06:17:57 +00:00
33 lines
745 B
Nix
33 lines
745 B
Nix
{ pkgs, inputs, ... }:
|
|
let
|
|
inherit (pkgs.lib) hasPrefix removePrefix;
|
|
in
|
|
pkgs.nixosOptionsDoc {
|
|
inherit
|
|
(pkgs.lib.evalModules {
|
|
modules = [ "${inputs.nixpkgs.outPath}/pkgs/top-level/config.nix" ];
|
|
class = "nixpkgsConfig";
|
|
})
|
|
options
|
|
;
|
|
documentType = "none";
|
|
transformOptions =
|
|
opt:
|
|
opt
|
|
// {
|
|
declarations = map (
|
|
decl:
|
|
if hasPrefix (toString ../..) (toString decl) then
|
|
let
|
|
subpath = removePrefix "/" (removePrefix (toString ../.) (toString decl));
|
|
in
|
|
{
|
|
url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}";
|
|
name = subpath;
|
|
}
|
|
else
|
|
decl
|
|
) opt.declarations;
|
|
};
|
|
}
|