diff options
author | lassulus <lass@lassul.us> | 2017-06-15 20:02:20 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-06-15 20:02:20 +0200 |
commit | fde07d4e5ed92309ca1c7570c936ec3d324ca2f3 (patch) | |
tree | c65814c4caecab5bf833dca05477e622c86b93d5 /tv/2configs/bash/default.nix | |
parent | e0f2449d526ba0f6a5bb8feebb8ca67bbc822554 (diff) | |
parent | ea468604d36257d182580d689035379b7ff8d78e (diff) |
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'tv/2configs/bash/default.nix')
-rw-r--r-- | tv/2configs/bash/default.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix new file mode 100644 index 000000000..40c0725ed --- /dev/null +++ b/tv/2configs/bash/default.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: + +with import <stockholm/lib>; + +{ + programs.bash = { + interactiveShellInit = '' + HISTCONTROL='erasedups:ignorespace' + HISTSIZE=65536 + HISTFILESIZE=$HISTSIZE + + shopt -s checkhash + shopt -s histappend histreedit histverify + shopt -s no_empty_cmd_completion + complete -d cd + ''; + promptInit = '' + 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 + ''; + }; +} |