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