aboutsummaryrefslogtreecommitdiff
path: root/modules/home/shells/bash
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home/shells/bash')
-rw-r--r--modules/home/shells/bash/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/home/shells/bash/default.nix b/modules/home/shells/bash/default.nix
new file mode 100644
index 0000000..d224442
--- /dev/null
+++ b/modules/home/shells/bash/default.nix
@@ -0,0 +1,40 @@
+{
+ config,
+ pkgs,
+ lib,
+ ...
+}:
+
+let
+ inherit (lib) mkEnableOption mkIf;
+ cfg = config.nx.shells.bash;
+in
+{
+ options.nx.shells.bash = {
+ enable = mkEnableOption "bash shell";
+ };
+
+ 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";
+ };
+ };
+ };
+}