From ed72bf64097b177ee734a604be37595322654acd Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 13 Jan 2018 14:51:36 +0100 Subject: [PATCH] bash: don't setup environment in a nix-shell --- modules/programs/bash.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index dc58af41..ee133772 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -72,6 +72,9 @@ in if [ -n "$__ETC_BASHRC_SOURCED" -o -n "$NOSYSBASHRC" ]; then return; fi __ETC_BASHRC_SOURCED=1 + # Don't execute this file when running in a pure nix-shell. + if test -n "$IN_NIX_SHELL"; then return; fi + export PATH=${config.environment.systemPath} ${config.system.build.setEnvironment.text} ${config.system.build.setAliases.text}