programs = { bash = { interactiveShellInit = '' bind '"\e[A":history-search-backward' bind '"\e[B":history-search-forward' # Ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace export HISTSIZE=42000 # Append to the history instead of overwriting (good for multiple connections) shopt -s histappend # Utilities mkcd () { mkdir -p "$1"; cd "$1"; } fan () { if [ $# -gt 0 ] then sudo tee /proc/acpi/ibm/fan <<<"level $1" else grep '^\(level\|speed\):' /proc/acpi/ibm/fan fi acpi -t } ''; shellAliases = { cl = "clear"; grep = "grep --color"; l = "ls -alh"; ll = "ls -al"; ls = "ls --color=tty"; mem = "ps -e -orss=,user=,args= | sort -b -k1,1n"; s="sudo systemctl"; st="sudo systemctl status"; u="systemctl --user"; j="sudo journalctl -u"; jb="sudo journalctl -b"; nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system"; mv = "mv -i"; sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f"; }; };