{ pkgs, lib, ... }: { programs.bash = { enable = true; enableVteIntegration = lib.mkIf pkgs.stdenv.isLinux true; historyFileSize = 999999; historyControl = [ "ignoredups" "ignorespace" ]; historyIgnore = [ "ls" "clear" "exit" ]; bashrcExtra = '' use() { declare -a all for p in "$@"; do all+=("''${NIXPKGS_PATH}#$p") done eval nix shell ''${all[@]} } '' + lib.optionalString pkgs.stdenv.isDarwin '' if [ "$TERM" != "dumb" ]; then source "${pkgs.bash-completion}/etc/profile.d/bash_completion.sh" nullglobStatus=$(shopt -p nullglob) shopt -s nullglob for p in $NIX_PROFILES; do for m in "$p/etc/bash_completion.d/"*; do source $m done done eval "$nullglobStatus" unset nullglobStatus p m fi # Make bash check its window size after a process completes shopt -s checkwinsize eval "$(/opt/homebrew/bin/brew shellenv)" ''; }; }