lib/modules: init with specialArgs helpers

This commit is contained in:
Matt Sturgeon 2024-08-02 01:26:01 +01:00
parent 491ca5cf51
commit 27c4c9c210
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
9 changed files with 35 additions and 49 deletions

View file

@ -40,6 +40,8 @@ let
pkgs = pkgsDoc;
};
inherit (helpers.modules) specialArgs;
nixvimPath = toString ./..;
gitHubDeclaration = user: repo: branch: subpath: {
@ -75,16 +77,7 @@ let
options-json =
(pkgsDoc.nixosOptionsDoc {
inherit
(lib.evalModules {
inherit modules;
specialArgs = {
inherit helpers;
defaultPkgs = pkgsDoc;
};
})
options
;
inherit (lib.evalModules { inherit modules specialArgs; }) options;
inherit transformOptions;
warningsAreErrors = false;
}).optionsJSON;
@ -113,10 +106,10 @@ in
# > sandbox-exec: pattern serialization length 69298 exceeds maximum (65535)
docs = pkgsDoc.callPackage ./mdbook {
inherit
helpers
modules
hmOptions
transformOptions
specialArgs
;
# TODO: Find how to handle stable when 24.11 lands
search = mkSearch "/nixvim/search/";

View file

@ -2,21 +2,15 @@
pkgs,
lib,
modules,
helpers,
nixosOptionsDoc,
transformOptions,
hmOptions,
search,
specialArgs,
}:
with lib;
let
options = lib.evalModules {
inherit modules;
specialArgs = {
inherit helpers;
defaultPkgs = pkgs;
};
};
options = lib.evalModules { inherit modules specialArgs; };
inherit (options.config.meta) nixvimInfo;