helpers: add mkPackageOption + refactoring

This commit is contained in:
Gaetan Lepage 2023-01-23 23:50:20 +01:00
parent 66b1b099cf
commit ff2be33445
58 changed files with 94 additions and 258 deletions

View file

@ -2,6 +2,7 @@
with lib;
let
cfg = config.plugins.commentary;
helpers = import ../helpers.nix { inherit lib; };
in
{
# TODO Add support for aditional filetypes. This requires autocommands!
@ -10,11 +11,7 @@ in
plugins.commentary = {
enable = mkEnableOption "commentary";
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.vim-commentary;
description = "Plugin to use for vim-commentary";
};
package = helpers.mkPackageOption "commentary" pkgs.vimPlugins.vim-commentary;
};
};