docs/home-manager: eval options without checking config definitions

By default `lib.evalModules` will check all config definitions match
a declared option (or a freeform type), leading to errors like:

    error: The option `wrapRc' does not exist.

Setting `_module.freeformType` or `_module.check` will disable this,
allowing us to evaluate the option declaration without checking the
config definitions.
This commit is contained in:
Matt Sturgeon 2024-09-27 02:49:44 +01:00
parent 6a1bf6bdc3
commit cb2b76c1a9
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
3 changed files with 11 additions and 10 deletions

View file

@ -22,14 +22,6 @@ let
};
modules = [
./modules/hm.nix
# FIXME: this can't go in ./modules/hm.nix because we eval that module in the docs _without_ nixvim's modules
{
_file = ./hm.nix;
config = {
wrapRc = lib.mkOptionDefault false;
impureRtp = lib.mkOptionDefault true;
};
}
];
};
in

View file

@ -13,4 +13,9 @@
};
imports = [ ./enable.nix ];
config = {
wrapRc = lib.mkOptionDefault false;
impureRtp = lib.mkOptionDefault true;
};
}