1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-01-30 21:05:02 +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:

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

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

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

BREAKING CHANGE: This modifies the following inconsistent default values
from 'false' to 'true':

- programs.zellij.enableBashIntegration
- programs.zellij.enableFishIntegration
- programs.zellij.enableZshIntegration
This commit is contained in:
NAHO 2025-01-25 23:16:15 +01:00
parent daf04c5950
commit 80001f1ef5
No known key found for this signature in database
GPG key ID: 229CB671D09B95F5
39 changed files with 343 additions and 591 deletions

View file

@ -1,6 +1,12 @@
{ lib }:
rec {
let
mkShellIntegrationOption = name: default:
lib.mkEnableOption "${name} integration" // {
inherit default;
example = !default;
};
in rec {
# Produces a Bourne shell like variable export statement.
export = n: v: ''export ${n}="${toString v}"'';
@ -8,4 +14,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

@ -1972,6 +1972,22 @@ in {
'yazi' alias.
'';
}
{
time = "2025-01-25T22:15:57+00:00";
message = ''
All 'programs.<PROGRAM>.enable<SHELL>Integration' values now default
to the new 'shell.enable<SHELL>Integration' options, which inherit
from the new the 'shell.enableShellIntegration' option.
This modifies the following inconsistent default values from 'false'
to 'true':
- programs.zellij.enableBashIntegration
- programs.zellij.enableFishIntegration
- programs.zellij.enableZshIntegration
'';
}
];
};
}

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

@ -0,0 +1,28 @@
{ config, lib, ... }: {
options.shell = let enable = config.shell.enableShellIntegration;
in {
enableShellIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
Whether to 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
config.shell.enableBashIntegration = false;
```
'';
};
enableBashIntegration = lib.hm.shell.mkBashIntegrationOption enable;
enableFishIntegration = lib.hm.shell.mkFishIntegrationOption enable;
enableIonIntegration = lib.hm.shell.mkIonIntegrationOption enable;
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption enable;
enableZshIntegration = lib.hm.shell.mkZshIntegrationOption enable;
};
}

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

@ -13,7 +13,16 @@ let
in {
meta.maintainers = [ maintainers.hawkw maintainers.water-sucks ];
options.programs.atuin = {
options.programs.atuin = let
mkShellIntegrationOption = option: description:
option // {
description = ''
${option.description}
${description}
'';
};
in {
enable = mkEnableOption "atuin";
package = mkOption {
@ -23,35 +32,19 @@ 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 = mkShellIntegrationOption
(lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration)
"If enabled, this will bind `ctrl-r` to open the Atuin history.";
enableFishIntegration = mkShellIntegrationOption
(lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration)
"If enabled, this will bind the up-arrow key to open the Atuin history.";
enableZshIntegration = mkShellIntegrationOption
(lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration) ''
If enabled, this will bind `ctrl-r` and the up-arrow key 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 = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Atuin's Fish integration.
If enabled, this will bind the up-arrow key to open the Atuin history.
'';
};
flags = mkOption {
default = [ ];

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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableFishIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Fish integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableZshIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Zsh integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
settings = mkOption {
type = with types; attrsOf str;

View file

@ -48,44 +48,34 @@ in {
'';
};
enableBashIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Bash integration.
'';
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
let option = lib.hm.shell.mkFishIntegrationOption true;
in option // {
description = ''
${option.description}
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.
'';
};
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:
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
```nix
environment.pathsToLink = [ "/share/fish" ];
```
to the system configuration.
'';
readOnly = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
nix-direnv = {
enable = mkEnableOption ''

View file

@ -32,17 +32,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableIonIntegration =
lib.hm.shell.mkIonIntegrationOption config.shell.enableIonIntegration;
enableIonIntegration = mkEnableOption "Ion integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration";
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
extraOptions = mkOption {
type = types.listOf types.str;

View file

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

View file

@ -10,7 +10,22 @@ let
in {
meta.maintainers = [ lib.maintainers.HeitorAugustoLN ];
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" { };
@ -85,29 +100,14 @@ in {
default = true;
};
enableBashIntegration = lib.mkEnableOption ''
bash shell integration.
enableBashIntegration = mkShellIntegrationOption
(lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration);
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 config.shell.enableFishIntegration);
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 config.shell.enableZshIntegration);
};
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 config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
enableXsessionIntegration = mkOption {
default = true;

View file

@ -49,12 +49,12 @@ let
'';
};
shellIntegrationDefaultOpt = {
default = !(elem "disabled" (splitString " " cfg.shellIntegration.mode));
defaultText = literalExpression ''
!(elem "disabled" (splitString " " config.programs.kitty.shellIntegration.mode))
'';
};
mkShellIntegrationOption = option:
option (!(elem "disabled" (splitString " " cfg.shellIntegration.mode))) // {
defaultText = literalExpression ''
!(elem "disabled" (splitString " " config.programs.kitty.shellIntegration.mode))
'';
};
in {
imports = [
(mkChangedOptionModule [ "programs" "kitty" "theme" ] [
@ -179,14 +179,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Kitty Bash integration"
// shellIntegrationDefaultOpt;
enableBashIntegration =
mkShellIntegrationOption lib.hm.shell.mkBashIntegrationOption;
enableFishIntegration = mkEnableOption "Kitty fish integration"
// shellIntegrationDefaultOpt;
enableFishIntegration =
mkShellIntegrationOption lib.hm.shell.mkFishIntegrationOption;
enableZshIntegration = mkEnableOption "Kitty Z Shell integration"
// shellIntegrationDefaultOpt;
enableZshIntegration =
mkShellIntegrationOption lib.hm.shell.mkZshIntegrationOption;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh Integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish Integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
globalConfig = mkOption {
type = tomlFormat.type;

View file

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

View file

@ -13,17 +13,14 @@ in {
description = "Package providing the {command}`nix-index` tool.";
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableFishIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable pyenv's Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to enable pyenv's Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
config = mkIf cfg.enable {

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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
config = mkIf cfg.enable {

View file

@ -53,25 +53,20 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableIonIntegration =
lib.hm.shell.mkIonIntegrationOption config.shell.enableIonIntegration;
enableIonIntegration = mkEnableOption "Ion integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
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 config.shell.enableBashIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "watson's zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "watson's fish integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
settings = mkOption {
type = iniFormat.type;

View file

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

View file

@ -54,21 +54,17 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = true;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = true;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = true;
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkEnableOption "Nushell integration" // {
default = true;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
enableAliases = mkOption {
default = false;

View file

@ -41,17 +41,14 @@ in {
'';
};
enableBashIntegration = mkEnableOption "Bash integration" // {
default = false;
};
enableBashIntegration =
lib.hm.shell.mkBashIntegrationOption config.shell.enableBashIntegration;
enableZshIntegration = mkEnableOption "Zsh integration" // {
default = false;
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkEnableOption "Fish integration" // {
default = false;
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
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 config.shell.enableBashIntegration;
enableZshIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Zsh integration.
'';
};
enableFishIntegration =
lib.hm.shell.mkFishIntegrationOption config.shell.enableFishIntegration;
enableFishIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Fish integration.
'';
};
enableNushellIntegration = lib.hm.shell.mkNushellIntegrationOption
config.shell.enableNushellIntegration;
enableNushellIntegration = mkOption {
default = true;
type = types.bool;
description = ''
Whether to enable Nushell integration.
'';
};
enableZshIntegration =
lib.hm.shell.mkZshIntegrationOption config.shell.enableZshIntegration;
};
config = mkIf cfg.enable {

View file

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