]> Git — Sourcephile - julm/julm-nix.git/blob - homes/softwares/bash.nix
backup: tweak sanoid conf
[julm/julm-nix.git] / homes / softwares / bash.nix
1 { pkgs, lib, config, ... }:
2 {
3 programs.bash = {
4 shellAliases = {
5 grep = "grep --color";
6 md-toc = "grep '^#\\+' --color";
7 mpl = "mplayer";
8 };
9 initExtra = ''
10 shopt -s globstar
11 '';
12 };
13 programs.direnv.enableBashIntegration = true;
14 home.sessionVariables = {
15 PS1 = ''\[\033[1;32m\]\[\e]0;\u@\h: \w\a\]\W\[\033[0m\] \$(e=\$?; if [ \$e != 0 ]; then echo '\[\e[0;91m\]'\$e'\[\e[0m\]'; fi)\$ '';
16 };
17 home.file.".inputrc".text = ''
18 "\e[1~": beginning-of-line
19 "\e[4~": end-of-line
20 "\e[7~": beginning-of-line
21 "\e[8~": end-of-line
22 "\eOH": beginning-of-line
23 "\eOF": end-of-line
24 "\e[H": beginning-of-line
25 "\e[F": end-of-line
26 "\e[1;5C": forward-word
27 "\e[1;5D": backward-word
28 "\e[5C": forward-word
29 "\e[5D": backward-word
30 "\e\e[C": forward-word
31 "\e\e[D": backward-word
32 '';
33 }