adds bash configuration (WIP)

This commit is contained in:
Dennis Schoepf 2025-09-20 22:20:09 +02:00
parent 3796a7c3f3
commit 64846f1cc5
2 changed files with 41 additions and 0 deletions

23
modules/bash/default.nix Normal file
View file

@ -0,0 +1,23 @@
{
programs.bash = {
enable = true;
enableCompletion = true;
shellAliases = {
"ff" = "${./bin/ff.sh}";
"ipl" = "ifconfig | grep \"inet \" | grep -v 127.0.0.1 | awk '{print $2}' | head -n 1";
"ipp" = "curl -4 ifconfig.me";
};
bashrcExtra = ''
# Env variables
# Setup emacs-libvterm
if [[ "$INSIDE_EMACS" = 'vterm' ]] \
&& [[ -n "$EMACS_VTERM_PATH" ]] \
&& [[ -f "$EMACS_VTERM_PATH/etc/emacs-vterm-bash.sh" ]]; then
source "$EMACS_VTERM_PATH
fi
'';
};
}