2016-07-23 11:11:33 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2016-10-20 18:54:38 +00:00
|
|
|
with import <stockholm/lib>;
|
2016-07-23 11:11:33 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
programs.bash = {
|
2017-07-13 23:45:10 +00:00
|
|
|
interactiveShellInit = /* sh */ ''
|
2016-07-23 11:11:33 +00:00
|
|
|
HISTCONTROL='erasedups:ignorespace'
|
|
|
|
HISTSIZE=65536
|
|
|
|
HISTFILESIZE=$HISTSIZE
|
2019-02-05 10:06:17 +00:00
|
|
|
HISTTIMEFORMAT=
|
2016-07-23 11:11:33 +00:00
|
|
|
|
|
|
|
shopt -s checkhash
|
|
|
|
shopt -s histappend histreedit histverify
|
|
|
|
shopt -s no_empty_cmd_completion
|
|
|
|
complete -d cd
|
2018-11-30 13:04:42 +00:00
|
|
|
|
|
|
|
case $UID in
|
|
|
|
${shell.escape (toString config.krebs.users.tv.uid)})
|
|
|
|
if test ''${SHLVL-1} = 1; then
|
|
|
|
case ''${XMONAD_SPAWN_WORKSPACE-} in
|
|
|
|
stockholm)
|
|
|
|
cd ~/stockholm
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|
2018-11-30 13:07:58 +00:00
|
|
|
|
|
|
|
export NIX_PATH="stockholm=$HOME/stockholm:$NIX_PATH"
|
2018-11-30 13:04:42 +00:00
|
|
|
;;
|
|
|
|
esac
|
2019-02-05 10:00:57 +00:00
|
|
|
|
|
|
|
${pkgs.bash-fzf-history.bind}
|
2016-07-23 11:11:33 +00:00
|
|
|
'';
|
2017-07-13 23:45:10 +00:00
|
|
|
promptInit = /* sh */ ''
|
2016-07-23 11:11:33 +00:00
|
|
|
case $UID in
|
|
|
|
0)
|
|
|
|
PS1='\[\e[1;31m\]\w\[\e[0m\] '
|
|
|
|
;;
|
|
|
|
${toString config.krebs.build.user.uid})
|
|
|
|
PS1='\[\e[1;32m\]\w\[\e[0m\] '
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PS1='\[\e[1;35m\]\u \[\e[1;32m\]\w\[\e[0m\] '
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
if test -n "$SSH_CLIENT"; then
|
|
|
|
PS1='\[\e[35m\]\h'" $PS1"
|
|
|
|
fi
|
|
|
|
if test -n "$SSH_AGENT_PID"; then
|
|
|
|
PS1="ssh-agent[$SSH_AGENT_PID] $PS1"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|