aboutsummaryrefslogtreecommitdiff
path: root/programs/bash.nix
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-09-26 16:56:36 +0100
committerAkshay <[email protected]>2021-09-26 16:56:36 +0100
commit5cdb4e421a809de51c3ebe8404e50d732721238b (patch)
tree73b71617c41b3e13edbf26035e821bb884d30441 /programs/bash.nix
init
Diffstat (limited to 'programs/bash.nix')
-rw-r--r--programs/bash.nix88
1 files changed, 88 insertions, 0 deletions
diff --git a/programs/bash.nix b/programs/bash.nix
new file mode 100644
index 0000000..cbba2de
--- /dev/null
+++ b/programs/bash.nix
@@ -0,0 +1,88 @@
1{ config
2, pkgs
3, ...
4}:
5
6{
7 programs.bash = {
8 enable = true;
9 historyControl = [ "erasedups" ];
10 historyFile = "\$HOME/.bash_history";
11 historyFileSize = 2000;
12 historyIgnore = [ "ls" "exit" "kill" ];
13 historySize = 1000;
14 shellAliases = {
15 "..." = "cd -- ../..";
16 grep = "grep --color=auto";
17 l = "ls -CF";
18 la = "ls -A";
19 ll = "ls -alF";
20 ls = "ls -F --color=always";
21 o = "xdg-open";
22 rless = "less -r";
23 tmux = "tmux -u";
24 tree = "tree -C";
25 vim = "nvim";
26 tb = "nc termbin.com 9999";
27
28 # git aliases
29 gb = "git branch -v";
30 gc = "git commit --verbose";
31 gd = "git diff --minimal";
32 ggp = "git push";
33 gl = "git log -p --abbrev-commit --pretty=medium";
34 glo = "git log --pretty=oneline --abbrev-commit";
35 gst = "git status --short";
36 };
37 shellOptions = [
38 "histappend"
39 "autocd"
40 "globstar"
41 "checkwinsize"
42 "cdspell"
43 "dirspell"
44 "expand_aliases"
45 "dotglob"
46 "gnu_errfmt"
47 "histreedit"
48 "nocasematch"
49 ];
50 sessionVariables = {
51 PROMPT_CHAR = "λ";
52 PROMPT_CHAR_COLOR = "cyan";
53 PROMPT_CHAR_ROOT = "#";
54 PROMPT_CHAR_ROOT_COLOR = "magenta";
55 SHORTEN_CWD = 1;
56 CWD_COLOR = "white";
57 EXPAND_TILDE = 0;
58 GIT_CLEAN = "·";
59 GIT_CLEAN_COLOR = "green";
60 GIT_WT_MODIFIED = "×";
61 GIT_WT_MODIFIED_COLOR = "red";
62 GIT_INDEX_MODIFIED = "±";
63 GIT_INDEX_MODIFIED_COLOR = "yellow";
64 BRANCH_COLOR = "bright black";
65 COMMIT_COLOR = "green";
66 PF_INFO = "ascii title os kernel uptime pkgs shell ";
67 PF_SEP = " ";
68 PF_COL1 = 7;
69 PF_COL2 = 7;
70 PF_COL3 = 6;
71 PF_ALIGN = "9";
72 PF_ASCII = "nixos";
73 _JAVA_AWT_WM_NONREPARENTING = 1;
74 TERM = "xterm-256color-italic";
75 EDITOR = "nvim";
76 MANPAGER = "nvim +Man!";
77 GPG_TTY = "\$(tty)";
78 };
79 initExtra = ''
80 [ -f $HOME/.github ] && . $HOME/.github
81 [ -f ~/.bash_aliases ] && . ~/.bash_aliases
82 [ -f ~/.fzf.bash ] && source ~/.fzf.bash
83 eval "$(direnv hook bash)"
84 export PS1='\n$(pista)'
85 export PATH=$PATH:"$HOME/scripts"
86 '';
87 };
88}