diff options
Diffstat (limited to 'bash.nix')
| -rw-r--r-- | bash.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/bash.nix b/bash.nix new file mode 100644 index 0000000..b223742 --- /dev/null +++ b/bash.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: + +{ + programs.bash = { + enable = true; + + sessionVariables = { + # for when Nix supports this + NIX_SHELL_PRESERVE_PROMPT = "1"; + }; + + initExtra = '' + if [ -z $IN_NIX_SHELL ] ; then + export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]\$ " + else + export PS1="[\[\e[34m\]\u@\h \W\[\e[39m\]]* " + fi + export PS2="> " + ''; + }; + + # automatically add the slash after a sym-linked directory + # https://unix.stackexchange.com/questions/257861 + home.file.".inputrc".text = '' + set mark-symlinked-directories on + ''; +} |
