mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
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:
parent
6a1bf6bdc3
commit
cb2b76c1a9
3 changed files with 11 additions and 10 deletions
|
@ -42,8 +42,12 @@ let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hmOptions = builtins.removeAttrs (lib.evalModules { modules = [ ../wrappers/modules/hm.nix ]; })
|
hmOptions = builtins.removeAttrs (lib.evalModules {
|
||||||
.options [ "_module" ];
|
modules = [
|
||||||
|
../wrappers/modules/hm.nix
|
||||||
|
{ _module.check = false; } # Ignore missing option declarations
|
||||||
|
];
|
||||||
|
}).options [ "_module" ];
|
||||||
|
|
||||||
options-json =
|
options-json =
|
||||||
(pkgs.nixosOptionsDoc {
|
(pkgs.nixosOptionsDoc {
|
||||||
|
|
|
@ -22,14 +22,6 @@ let
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./modules/hm.nix
|
./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
|
in
|
||||||
|
|
|
@ -13,4 +13,9 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [ ./enable.nix ];
|
imports = [ ./enable.nix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
wrapRc = lib.mkOptionDefault false;
|
||||||
|
impureRtp = lib.mkOptionDefault true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue