From 53140e55562481faf1ea8a29c6569e05f2489b4e Mon Sep 17 00:00:00 2001 From: Stefan Imhoff Date: Mon, 29 Jul 2024 15:33:42 +0200 Subject: [PATCH] feat(nix): migrate bash --- nix/home/bash/default.nix | 39 +++++++++++++++++++++++++++++++++++++++ nix/home/default.nix | 2 +- nix/home/lsd/default.nix | 2 +- 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 nix/home/bash/default.nix diff --git a/nix/home/bash/default.nix b/nix/home/bash/default.nix new file mode 100644 index 0000000..f781051 --- /dev/null +++ b/nix/home/bash/default.nix @@ -0,0 +1,39 @@ +{ pkgs, ... }: + +{ + programs.bash = { + enable = true; + enableCompletion = true; + sessionVariables = { + SSH_AUTH_SOCK = "$HOME/Library/Containers/com.maxgoedjen.Secretive.SecretAgent/Data/socket.ssh"; + FD_OPTIONS = "--follow --exclude .git --exclude node_modules"; + KEYTIMEOUT = 1; + GIT_EDITOR = "nvim"; + EDITOR = "nvim"; + FZF_DEFAULT_COMMAND = "git ls-files --cached --others --exclude-standard | fd --hidden --type f --type l $FD_OPTIONS"; + FZF_DEFAULT_OPTS = "--no-height"; + FZF_CTRL_T_COMMAND = "$FZF_DEFAULT_COMMAND"; + FZF_CTRL_T_OPTS = "--preview 'bat --color=always --style=numbers {}' --bind shift-up:preview-page-up,shift-down:preview-page-down"; + FZF_CTRL_R_OPTS = "--reverse"; + FZF_TMUX_OPTS = "-p"; + FZF_ALT_C_COMMAND = "fd --type d $FD_OPTIONS --color=never --hidden"; + FZF_ALT_C_OPTS = "--preview 'tree -C {} | head -50'"; + }; + shellAliases = { + ".." = "cd .."; + }; + shellOptions = [ + "histappend" + "checkwinsize" + "extglob" + "globstar" + "checkjobs" + ]; + historyControl = [ + "erasedups" + "ignorespace" + ]; + historyFileSize = 100000; + historySize = 10000; + }; +} diff --git a/nix/home/default.nix b/nix/home/default.nix index 31c19cc..fe2a9bf 100644 --- a/nix/home/default.nix +++ b/nix/home/default.nix @@ -9,6 +9,7 @@ in ./ack ./ag ./asdf + ./bash ./bat ./ctags ./curl @@ -82,7 +83,6 @@ in # environment. home.packages = with pkgs; [ atuin # Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines - bash # GNU Bourne-Again Shell, the de facto standard shell on Linux bfg-repo-cleaner # Removes large or troublesome blobs in a git repository like git-filter-branch does, but faster btop # Monitor of resources bzip2 # High-quality data compression program diff --git a/nix/home/lsd/default.nix b/nix/home/lsd/default.nix index 330f87c..9d9c603 100644 --- a/nix/home/lsd/default.nix +++ b/nix/home/lsd/default.nix @@ -4,7 +4,7 @@ programs.lsd = { enable = true; - enableAliases = true; + enableAliases = false; settings = { classic = false; blocks = [