{ pkgs, lib, ndg-builder, }: let eval = lib.evalModules { specialArgs = { inherit pkgs; }; modules = [ ./module.nix ]; }; optionsDoc = pkgs.nixosOptionsDoc { inherit (eval) options; transformOptions = opt: opt // { # Clean up declaration sites to not refer to the source tree. declarations = let devDir = toString /home/bolt/code/smooooth; inherit (lib) hasPrefix removePrefix; in map ( decl: if hasPrefix (toString devDir) (toString decl) then let subpath = removePrefix "/" (removePrefix (toString devDir) (toString decl)); in { url = "https://git.atagen.co/atagen/smooooth/${subpath}"; name = subpath; } else decl ) opt.declarations; }; }; in ndg-builder.override { title = "smooooth documentation"; rawModules = [ ./module.nix ]; }