summary refs log tree commit diff
path: root/gnu/home/services/shells.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/home/services/shells.scm')
-rw-r--r--gnu/home/services/shells.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index d7dd579293..3326eb37f4 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -407,6 +407,15 @@ if [ -f ~/.profile ]; then source ~/.profile; fi
 # Honor per-interactive-shell startup file
 if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
 "
+
+        ;; The host distro might provide a bad 'PS1' default--e.g., not taking
+        ;; $GUIX_ENVIRONMENT into account.  Provide a good default here when
+        ;; asked to.  The default can be overridden below via
+        ;; 'environment-variables'.
+        (if (home-bash-configuration-guix-defaults? config)
+            "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n"
+            "")
+
         (serialize-field 'bash-profile)
         (serialize-field 'environment-variables)))