87 lines
2.0 KiB
Nix
87 lines
2.0 KiB
Nix
|
{ pkgs, ... }:
|
||
|
{
|
||
|
# TODO: "bind -s 'set completion-ignore-case on'"
|
||
|
programs.bash.enable = true;
|
||
|
#programs.bash.enableCompletion = true;
|
||
|
programs.bash.shellOptions = [
|
||
|
# Append to history file rather than replacing it.
|
||
|
"histappend"
|
||
|
# check the window size after each command and, if
|
||
|
# necessary, update the values of LINES and COLUMNS.
|
||
|
"checkwinsize"
|
||
|
# Extended globbing.
|
||
|
"extglob"
|
||
|
"globstar"
|
||
|
# Warn if closing shell with running jobs.
|
||
|
"checkjobs"
|
||
|
];
|
||
|
|
||
|
programs.fzf.enable = true; # TODO: does this conflict with system-wide setup?
|
||
|
|
||
|
programs.exa.enable = true;
|
||
|
programs.exa.enableAliases = true;
|
||
|
|
||
|
# i can't type
|
||
|
home.shellAliases.sl = "exa";
|
||
|
home.shellAliases.dc = "cd";
|
||
|
|
||
|
programs.direnv.enable = true;
|
||
|
|
||
|
programs.tealdeer.enable = true;
|
||
|
|
||
|
|
||
|
# just use ncdu lol
|
||
|
home.shellAliases.dush = "du -shc * | sort -h";
|
||
|
home.shellAliases.dushd = "du -shc * .[!.]?* | sort -h";
|
||
|
|
||
|
home.shellAliases.diff = "diff -u --color"; # eyo
|
||
|
home.shellAliases.ip = "ip -br -color";
|
||
|
home.shellAliases.rssh = "ssh -l root";
|
||
|
home.shellAliases.sudo = "sudo ";
|
||
|
home.shellAliases.watch = "watch -c "; # parse colors
|
||
|
home.shellAliases.xargs = "xargs ";
|
||
|
|
||
|
home.packages = with pkgs; [
|
||
|
rsync
|
||
|
bind.dnsutils
|
||
|
vimv
|
||
|
git
|
||
|
curl
|
||
|
wget
|
||
|
|
||
|
#tldr
|
||
|
entr
|
||
|
axel aria
|
||
|
xe # xargs alternative
|
||
|
sd # sed alternative
|
||
|
fd # find alternative
|
||
|
silver-searcher # `ag`
|
||
|
ripgrep
|
||
|
gron
|
||
|
jq
|
||
|
yq
|
||
|
fq
|
||
|
htmlq
|
||
|
just
|
||
|
sysz
|
||
|
du-dust # du alternative
|
||
|
ncdu # Disk usage analyzer with an ncurses interface
|
||
|
xplr # tui file explorer
|
||
|
aha
|
||
|
];
|
||
|
|
||
|
programs.bash.initExtra = ''
|
||
|
parse_git_branch() {
|
||
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
|
||
|
}
|
||
|
export PS1='\[\033[01;32m\]\u@\h\[\033[01;37m\] \[\033[01;34m\]\W\[\033[33m\]$(parse_git_branch)\[\033[01;32m\]\$\[\033[00m\] '
|
||
|
|
||
|
# tldr
|
||
|
it command -v tldr >/dev/null; then
|
||
|
complete -F _command tldr
|
||
|
fi
|
||
|
'';
|
||
|
|
||
|
|
||
|
}
|