From 8f351726c5841d86854e7fa6003ea472352f5208 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Tue, 11 Feb 2025 08:33:28 -0600 Subject: [PATCH] git-worktree-switcher: use lib.hm.shell.mkShellIntegrationOption --- modules/programs/git-worktree-switcher.nix | 31 +++++++--------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/modules/programs/git-worktree-switcher.nix b/modules/programs/git-worktree-switcher.nix index e7dcbf2c..cb38f2e6 100644 --- a/modules/programs/git-worktree-switcher.nix +++ b/modules/programs/git-worktree-switcher.nix @@ -1,7 +1,7 @@ { pkgs, config, lib, ... }: let - inherit (lib) mkEnableOption mkOption mkPackageOption optionalString; + inherit (lib) mkEnableOption mkPackageOption optionalString; cfg = config.programs.git-worktree-switcher; @@ -17,27 +17,14 @@ in { options.programs.git-worktree-switcher = { enable = mkEnableOption "git-worktree-switcher"; package = mkPackageOption pkgs "git-worktree-switcher" { }; - enableBashIntegration = mkOption { - type = lib.types.bool; - default = true; - description = '' - Whether to enable git-worktree-switcher's Bash integration. - ''; - }; - enableFishIntegration = mkOption { - type = lib.types.bool; - default = config.programs.fish.enable; - description = '' - Whether to enable git-worktree-switcher's Fish integration. - ''; - }; - enableZshIntegration = mkOption { - type = lib.types.bool; - default = config.programs.zsh.enable; - description = '' - Whether to enable git-worktree-switcher's Zsh integration. - ''; - }; + enableBashIntegration = + lib.hm.shell.mkBashIntegrationOption { inherit config; }; + + enableFishIntegration = + lib.hm.shell.mkFishIntegrationOption { inherit config; }; + + enableZshIntegration = + lib.hm.shell.mkZshIntegrationOption { inherit config; }; }; config = lib.mkIf cfg.enable {