1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-06 16:57:03 +00:00

git-worktree-switcher: use lib.hm.shell.mkShellIntegrationOption

This commit is contained in:
Austin Horstman 2025-02-11 08:33:28 -06:00
parent 9c8169b446
commit 8f351726c5

View file

@ -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 {