plugins/git-worktree: remove with lib

This commit is contained in:
Austin Horstman 2025-01-23 23:29:42 -06:00
parent ff7570d781
commit 7dd9684264
No known key found for this signature in database

View file

@ -5,14 +5,13 @@
pkgs,
...
}:
with lib;
let
cfg = config.plugins.git-worktree;
in
{
options = {
plugins.git-worktree = {
enable = mkEnableOption "git-worktree";
enable = lib.mkEnableOption "git-worktree";
package = lib.mkPackageOption pkgs "git-worktree" {
default = [
@ -25,7 +24,7 @@ in
nullable = true;
};
enableTelescope = mkEnableOption "telescope integration";
enableTelescope = lib.mkEnableOption "telescope integration";
changeDirectoryCommand = helpers.defaultNullOpts.mkStr "cd" ''
The vim command used to change to the new worktree directory.
@ -65,7 +64,7 @@ in
inherit autopush;
};
in
mkIf cfg.enable {
lib.mkIf cfg.enable {
assertions = [
{
assertion = cfg.enableTelescope -> config.plugins.telescope.enable;