diff options
| author | Tom Harley | 2020-12-30 10:52:09 +0000 |
|---|---|---|
| committer | Tom Harley | 2020-12-30 10:52:41 +0000 |
| commit | 68cf8766e2636a50b0a660368b18426e2c12d487 (patch) | |
| tree | f7f73e3a93e36ca544b14e6fdb3bd31073262424 /bash.nix | |
| download | home-manager-68cf8766e2636a50b0a660368b18426e2c12d487.tar.gz home-manager-68cf8766e2636a50b0a660368b18426e2c12d487.zip | |
Initial commit
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 + ''; +} |
