diff options
| author | schererleander <leander@schererleander.de> | 2026-01-08 12:17:01 +0100 |
|---|---|---|
| committer | Leander Scherer <leander@schererleander.de> | 2026-01-08 19:08:12 +0100 |
| commit | 130cf0ca75680d877ee5888d5966cfb8d422781f (patch) | |
| tree | 4f00b35b80b25bbc54cbd3c30c2872f0de25042d /modules/users/shells/bash/default.nix | |
| parent | 6174f3650cf42aaf008012e828d5a1f8e2ce037f (diff) | |
feat(shells): configure minimal bash shell with zoxide
Diffstat (limited to 'modules/users/shells/bash/default.nix')
| -rw-r--r-- | modules/users/shells/bash/default.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/users/shells/bash/default.nix b/modules/users/shells/bash/default.nix new file mode 100644 index 0000000..d17ffc5 --- /dev/null +++ b/modules/users/shells/bash/default.nix @@ -0,0 +1,43 @@ +{ + config, + pkgs, + lib, + ... +}: + +let + inherit (lib) mkOption mkIf types; + cfg = config.nx.shells.bash; +in +{ + options.nx.shells.bash = { + enable = mkOption { + type = types.bool; + default = config.nx.terminal.defaultShell == "bash"; + }; + }; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + zoxide + ]; + + programs.bash = { + enable = true; + enableCompletion = true; + initExtra = '' + # view man pages with nvim + export MANPAGER="nvim +Man!" + + # vim keybindings + set -o vi + + # zoxide smarter cd command + eval "$(zoxide init bash)" + ''; + shellAliases = { + ls = "ls --color=auto"; + }; + }; + }; +} |
