1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00

treewide: standardize shell integration options

Standardize all 'programs.<PROGRAM>.enable<SHELL>Integration' options
with the following new functions:

- lib.hm.shell.mkBashIntegrationOption
- lib.hm.shell.mkFishIntegrationOption
- lib.hm.shell.mkIonIntegrationOption
- lib.hm.shell.mkNushellIntegrationOption
- lib.hm.shell.mkZshIntegrationOption

These functions should default to their corresponding global option:

- home.shell.enableBashIntegration
- home.shell.enableFishIntegration
- home.shell.enableIonIntegration
- home.shell.enableNushellIntegration
- home.shell.enableZshIntegration

All these global options default to the
'home.shell.enableShellIntegration' value.

This hierarchy standardizes the shell integration and increases end-user
flexibility.

BREAKING CHANGE: The following inconsistent default values change from
'false' to 'true':

- programs.zellij.enableBashIntegration
- programs.zellij.enableFishIntegration
- programs.zellij.enableZshIntegration

Link: https://github.com/nix-community/home-manager/pull/6358

Co-authored-by: Robert Helgesson <robert@rycee.net>
This commit is contained in:
NAHO 2025-01-25 23:16:15 +01:00 committed by Robert Helgesson
parent bf9a1a0689
commit 5af1b9a0f1
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
40 changed files with 362 additions and 609 deletions

View file

@ -1,6 +1,22 @@
{ lib }:
rec {
let
mkShellIntegrationOption = name:
{ config, baseName ? name, extraDescription ? "" }:
let attrName = "enable${baseName}Integration";
in lib.mkOption {
default = config.home.shell.${attrName};
defaultText = lib.literalMD "[](#opt-home.shell.${attrName})";
example = false;
description = "Whether to enable ${name} integration.${
lib.optionalString (extraDescription != "")
("\n\n" + extraDescription)
}";
type = lib.types.bool;
};
in rec {
# Produces a Bourne shell like variable export statement.
export = n: v: ''export ${n}="${toString v}"'';
@ -8,4 +24,10 @@ rec {
# assignment, this function produces a string containing an export
# statement for each set entry.
exportAll = vars: lib.concatStringsSep "\n" (lib.mapAttrsToList export vars);
mkBashIntegrationOption = mkShellIntegrationOption "Bash";
mkFishIntegrationOption = mkShellIntegrationOption "Fish";
mkIonIntegrationOption = mkShellIntegrationOption "Ion";
mkNushellIntegrationOption = mkShellIntegrationOption "Nushell";
mkZshIntegrationOption = mkShellIntegrationOption "Zsh";
}

View file

@ -2018,6 +2018,22 @@ in {
systems.
'';
}
{
time = "2025-02-07T22:31:45+00:00";
message = ''
All 'programs.<PROGRAM>.enable<SHELL>Integration' values now default
to the new 'home.shell.enable<SHELL>Integration' options, which
inherit from the new the 'home.shell.enableShellIntegration' option.
The following inconsistent default values change from 'false' to
'true':
- programs.zellij.enableBashIntegration
- programs.zellij.enableFishIntegration
- programs.zellij.enableZshIntegration
'';
}
];
};
}

43
modules/misc/shell.nix Normal file
View file

@ -0,0 +1,43 @@
{ config, lib, ... }:
{
options.home.shell = {
enableShellIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
Whether to globally enable shell integration for all supported shells.
Individual shell integrations can be overridden with their respective
`shell.enable<SHELL>Integration` option. For example, the following
declaration globally disables shell integration for Bash:
```nix
home.shell.enableBashIntegration = false;
```
'';
};
enableBashIntegration = lib.hm.shell.mkBashIntegrationOption {
inherit config;
baseName = "Shell";
};
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption {
inherit config;
baseName = "Shell";
};
enableIonIntegration = lib.hm.shell.mkIonIntegrationOption {
inherit config;
baseName = "Shell";
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption {
inherit config;
baseName = "Shell";
};
enableZshIntegration = lib.hm.shell.mkZshIntegrationOption {
inherit config;
baseName = "Shell";
};
};
}

View file

@ -36,6 +36,7 @@ let
./misc/pam.nix
./misc/qt.nix
./misc/qt/kconfig.nix
./misc/shell.nix
./misc/specialisation.nix
./misc/submodule-support.nix
./misc/tmpfiles.nix

View file

@ -23,33 +23,26 @@ in {
description = "The package to use for atuin.";
};
enableBashIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Atuin's Bash integration. This will bind
`ctrl-r` to open the Atuin history.
'';
enableBashIntegration = lib.hm.shell.mkBashIntegrationOption {
inherit config;
extraDescription =
"If enabled, this will bind `ctrl-r` to open the Atuin history.";
};
enableZshIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Atuin's Zsh integration.
If enabled, this will bind `ctrl-r` and the up-arrow
key to open the Atuin history.
'';
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption {
inherit config;
extraDescription =
"If enabled, this will bind the up-arrow key to open the Atuin history.";
};
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Atuin's Fish integration.
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
If enabled, this will bind the up-arrow key to open the Atuin history.
enableZshIntegration = lib.hm.shell.mkZshIntegrationOption {
inherit config;
extraDescription = ''
If enabled, this will bind `ctrl-r` and the up-arrow key to open the
Atuin history.
'';
};
@ -89,14 +82,6 @@ in {
'';
};
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
daemon = {
enable = mkEnableOption "Atuin daemon";

View file

@ -13,29 +13,14 @@ in {
options.programs.autojump = {
enable = mkEnableOption "autojump";
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -154,37 +154,17 @@ in {
options.programs.broot = {
enable = mkEnableOption "Broot, a better way to navigate directories";
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
package = mkOption {
type = types.package;

View file

@ -16,21 +16,17 @@ in {
package = mkPackageOption pkgs "carapace" { };
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -19,29 +19,14 @@ in {
'';
};
enableBashIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Fish integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Zsh integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
settings = mkOption {
type = with types; attrsOf str;

View file

@ -48,44 +48,32 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption {
inherit config;
extraDescription = ''
Note, enabling the direnv module will always active its functionality
for Fish since the direnv package automatically gets loaded in Fish.
If this is not the case try adding
enableFishIntegration = mkOption {
default = true;
type = types.bool;
readOnly = true;
description = ''
Whether to enable Fish integration. Note, enabling the direnv module
will always active its functionality for Fish since the direnv package
automatically gets loaded in Fish. If this is not the case try adding
```nix
environment.pathsToLink = [ "/share/fish" ];
```
to the system configuration.
'';
} // {
default = true;
readOnly = true;
};
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
nix-direnv = {
enable = mkEnableOption ''

View file

@ -32,17 +32,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -21,23 +21,20 @@ with lib;
options.programs.eza = {
enable = mkEnableOption "eza, a modern replacement for {command}`ls`";
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableIonIntegration =
lib.hm.shell.mkIonIntegrationOption { inherit config; };
enableIonIntegration = mkEnableOption "Ion integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration";
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
extraOptions = mkOption {
type = types.listOf types.str;

View file

@ -158,29 +158,14 @@ in {
};
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -10,7 +10,22 @@ let
in {
meta.maintainers = with lib.maintainers; [ HeitorAugustoLN khaneliman ];
options.programs.ghostty = {
options.programs.ghostty = let
mkShellIntegrationOption = option:
option // {
description = ''
${option.description}
This ensures that shell integration works in more scenarios, such as
switching shells within Ghostty. But it is not needed to have shell
integration.
See
<https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup>
for more information.
'';
};
in {
enable = lib.mkEnableOption "Ghostty";
package = lib.mkPackageOption pkgs "ghostty" {
@ -91,29 +106,14 @@ in {
lib.literalMD "`true` if programs.ghostty.package is not null";
};
enableBashIntegration = lib.mkEnableOption ''
bash shell integration.
enableBashIntegration = mkShellIntegrationOption
(lib.hm.shell.mkBashIntegrationOption { inherit config; });
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
enableFishIntegration = mkShellIntegrationOption
(lib.hm.shell.mkFishIntegrationOption { inherit config; });
enableFishIntegration = lib.mkEnableOption ''
fish shell integration.
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
enableZshIntegration = lib.mkEnableOption ''
zsh shell integration.
This is ensures that shell integration works in more scenarios, such as switching shells within Ghostty.
But it is not needed to have shell integration.
See <https://ghostty.org/docs/features/shell-integration#manual-shell-integration-setup> for more information
'';
enableZshIntegration = mkShellIntegrationOption
(lib.hm.shell.mkZshIntegrationOption { inherit config; });
};
config = lib.mkIf cfg.enable (lib.mkMerge [

View file

@ -13,13 +13,8 @@ in {
options.programs.granted = {
enable = mkEnableOption "granted";
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -16,13 +16,11 @@ in {
package = mkPackageOption pkgs "hstr" { };
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -63,37 +63,17 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableXsessionIntegration = mkOption {
default = true;

View file

@ -50,7 +50,8 @@ let
'';
};
shellIntegrationDefaultOpt = {
mkShellIntegrationOption = option:
option // {
default =
!(lib.elem "disabled" (lib.splitString " " cfg.shellIntegration.mode));
defaultText = literalExpression ''
@ -184,14 +185,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Kitty Bash integration"
// shellIntegrationDefaultOpt;
enableBashIntegration = mkShellIntegrationOption
(lib.hm.shell.mkBashIntegrationOption { inherit config; });
enableFishIntegration = mkEnableOption "Kitty fish integration"
// shellIntegrationDefaultOpt;
enableFishIntegration = mkShellIntegrationOption
(lib.hm.shell.mkFishIntegrationOption { inherit config; });
enableZshIntegration = mkEnableOption "Kitty Z Shell integration"
// shellIntegrationDefaultOpt;
enableZshIntegration = mkShellIntegrationOption
(lib.hm.shell.mkZshIntegrationOption { inherit config; });
};
extraConfig = mkOption {

View file

@ -109,29 +109,14 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable (mkMerge [

View file

@ -30,17 +30,14 @@ in {
package = mkPackageOption pkgs "mise" { };
enableBashIntegration = mkEnableOption "Bash Integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh Integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish Integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
globalConfig = mkOption {
type = tomlFormat.type;

View file

@ -47,17 +47,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -14,17 +14,14 @@ in {
description = "Package providing the {command}`nix-index` tool.";
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = lib.mkIf cfg.enable {

View file

@ -16,17 +16,14 @@ in {
package = mkPackageOption pkgs "nix-your-shell" { };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -47,37 +47,17 @@ in {
'';
};
enableBashIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -19,29 +19,14 @@ in {
description = "Opam package to install.";
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -12,21 +12,17 @@ in {
package = mkPackageOption pkgs "pay-respects" { };
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -12,29 +12,14 @@ in {
options.programs.pazi = {
enable = mkEnableOption "pazi";
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -19,29 +19,14 @@ in {
description = "The package to use for pyenv.";
};
enableBashIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable pyenv's Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable pyenv's Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable pyenv's Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
rootDirectory = lib.mkOption {
type = lib.types.path;

View file

@ -55,17 +55,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -16,29 +16,14 @@ in {
description = "Package providing the {command}`scmpuff` tool.";
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableAliases = mkOption {
default = true;

View file

@ -83,29 +83,14 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -53,25 +53,20 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableIonIntegration =
lib.hm.shell.mkIonIntegrationOption { inherit config; };
enableIonIntegration = mkEnableOption "Ion integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableInteractive = mkOption {
type = types.bool;

View file

@ -13,33 +13,17 @@ with lib;
enableInstantMode = mkEnableOption "thefuck's experimental instant mode";
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = let

View file

@ -26,17 +26,14 @@ in {
description = "Package providing the {command}`watson`.";
};
enableBashIntegration = mkEnableOption "watson's bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "watson's zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "watson's fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
settings = mkOption {
type = iniFormat.type;

View file

@ -82,13 +82,11 @@ in {
'';
};
enableBashIntegration = mkEnableOption "WezTerm's Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "WezTerm's Zsh integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -54,21 +54,17 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
keymap = mkOption {
type = tomlFormat.type;

View file

@ -29,29 +29,14 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
enableAliases = mkOption {
default = false;

View file

@ -41,17 +41,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = false;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = false;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = false;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -32,37 +32,17 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
config = mkIf cfg.enable {

View file

@ -260,21 +260,17 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption { inherit config; };
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption { inherit config; };
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration =
lib.hm.shell.mkNushellIntegrationOption { inherit config; };
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption { inherit config; };
};
};