modules: cleanup with lib

This commit is contained in:
Austin Horstman 2024-08-30 14:37:41 -05:00
parent ff042dfc93
commit 1c9ba58aef
No known key found for this signature in database
12 changed files with 79 additions and 85 deletions

View file

@ -4,8 +4,9 @@
helpers,
...
}:
with lib;
let
inherit (lib) types mkOption;
pluginWithConfigType = types.submodule {
options = {
config = mkOption {
@ -14,7 +15,7 @@ let
default = "";
};
optional = mkEnableOption "optional" // {
optional = lib.mkEnableOption "optional" // {
description = "Don't load by default (load with :packadd)";
};
@ -43,7 +44,7 @@ in
extraPython3Packages = mkOption {
type = with types; functionTo (listOf package);
default = p: [ ];
defaultText = literalExpression "p: with p; [ ]";
defaultText = lib.literalExpression "p: with p; [ ]";
description = "Python packages to add to the `PYTHONPATH` of neovim.";
example = lib.literalExpression ''
p: [ p.numpy ]