diff --git a/flake.nix b/flake.nix
index 4676c2e8..03d8b69c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -85,16 +85,19 @@
             # FIXME This works on Ubuntu, may not on other distros. FIXME
             export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive
 
-            export PS1='labenv(HiPEAC) (ibex-demo-system) \$ '
+            if [ -z "$DIRENV_IN_ENVRC" ]; then
+              export PS1='labenv(HiPEAC) (ibex-demo-system) \$ '
+
+              echo
+              echo
+              cat ./data/lowrisc.art
+            fi
 
-            echo
-            echo
-            cat ./data/lowrisc.art
             echo "---------------------------------------------------"
             echo "Welcome to the 'ibex-demo-system' nix environment!"
             echo "---------------------------------------------------"
 
-            helpstr=$(cat <<'EOF'
+            helpme(){ cat <<'EOF'
 
             Build ibex software :
                 mkdir sw/c/build && pushd sw/c/build && cmake ../ && make && popd
@@ -114,17 +117,24 @@
             Connect gdb to a running program on the FPGA (In a different terminal to the OpenOCD instance):
                 riscv32-unknown-elf-gdb -ex "target extended-remote localhost:3333" ./sw/c/build/demo/hello_world/demo
 
+            EOF
+
+              if [ -z "$DIRENV_IN_ENVRC" ]; then
+                cat <<'EOF'
             To leave the environment:
                 exit
 
             EOF
-            )
-            helpme(){ echo "$helpstr"; }
+              fi
+            }
+
             helpme
 
-            echo
-            echo "Run 'helpme' in your shell to see this message again."
-            echo
+            if [ -z "$DIRENV_IN_ENVRC" ]; then
+              echo
+              echo "Run 'helpme' in your shell to see this message again."
+              echo
+            fi
           '';
         };
         formatter = pkgs.alejandra;