fix(docs): home-manager options not shown

This commit is contained in:
Jalil David Salamé Messina 2024-01-31 22:17:10 +01:00
parent cf3b38a355
commit 56230627db
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -1,14 +1,18 @@
{ pkgs, lib }:
let
filterVisible = toplevelOption: option: option // { visible = option.visible && builtins.elemAt option.loc 0 == toplevelOption; };
nixos-eval = lib.evalModules { modules = [ ../nixos/options.nix ]; };
home-eval = lib.evalModules { modules = [ ../home/options.nix ]; };
home-eval = lib.evalModules {
modules = [ ../home/options.nix ];
specialArgs = { inherit pkgs; };
};
nixos-markdown = (pkgs.nixosOptionsDoc {
inherit (nixos-eval) options;
transformOptions = option: option // { visible = option.visible && builtins.elemAt option.loc 0 == "jconfig"; };
transformOptions = filterVisible "jconfig";
}).optionsCommonMark;
home-markdown = (pkgs.nixosOptionsDoc {
inherit (home-eval) options;
transformOptions = option: option // { visible = option.visible && builtins.elemAt option.loc 0 == "jconfig"; };
transformOptions = filterVisible "jhome";
}).optionsCommonMark;
in
{