]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/bash.nix
carotte: try to fix build
[julm/julm-nix.git] / nixos / profiles / bash.nix
1 {
2 programs.bash = {
3 interactiveShellInit = ''
4 bind '"\e[A":history-search-backward'
5 bind '"\e[B":history-search-forward'
6
7 # Ignore duplicate commands, ignore commands starting with a space
8 export HISTCONTROL=erasedups:ignorespace
9 export HISTSIZE=42000
10 # Append to the history instead of overwriting (good for multiple connections)
11 shopt -s histappend
12
13 # Utilities
14 mkcd () { mkdir -p "$1"; cd "$1"; }
15 '';
16 shellAliases = {
17 cl = "clear";
18 grep = "grep --color";
19 l = "ls -alh";
20 ll = "ls -al";
21 ls = "ls --color=tty";
22 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
23
24 s="sudo systemctl";
25 st="sudo systemctl status";
26 j="sudo journalctl -u";
27 jb="sudo journalctl -b";
28
29 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
30 mv = "mv -i";
31 };
32 };
33 }