Skip to content

Commit

Permalink
wrapper: allow specifying specialArgs (#141)
Browse files Browse the repository at this point in the history
This is required for disko for modulesPath
  • Loading branch information
SuperSandro2000 authored Oct 24, 2024
1 parent bedc2f2 commit 9704278
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nix/wrapper.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ lib, nixosOptionsDoc, nuscht-search, ixxPkgs, runCommand, xorg }:

rec {
mkOptionsJSON = modules: (nixosOptionsDoc {
mkOptionsJSON = { modules, specialArgs }: (nixosOptionsDoc {
inherit ((lib.evalModules {
modules = modules ++ [
({ lib, ... }: {
Expand All @@ -11,13 +11,17 @@ rec {
config._module.check = false;
})
];
inherit specialArgs;
})) options;
warningsAreErrors = false;
}).optionsJSON + /share/doc/nixos/options.json;

mkSearchData = scopes:
let
optionsJSON = opt: opt.optionsJSON or (mkOptionsJSON opt.modules);
optionsJSON = opt: opt.optionsJSON or (mkOptionsJSON {
inherit (opt) modules;
specialArgs = opt.specialArgs or { };
});
config = {
scopes = map
(scope: (lib.filterAttrs (name: _value: name != "modules") scope) // { optionsJson = optionsJSON scope; })
Expand Down

0 comments on commit 9704278

Please sign in to comment.