From 02288320d035d331f78727547d53dbdc0514763e Mon Sep 17 00:00:00 2001
From: Robert Helgesson <robert@rycee.net>
Date: Mon, 15 May 2017 23:50:16 +0200
Subject: [PATCH] home-environment: use explicit PATH in activation

In the activation script we expect to use the tools provided by GNU
Core Utilities and GNU Bash. This commit therefore explicitly add
these first in the `PATH` environment variable.
---
 modules/home-environment.nix | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/home-environment.nix b/modules/home-environment.nix
index 694a2aa0..f665833f 100644
--- a/modules/home-environment.nix
+++ b/modules/home-environment.nix
@@ -375,6 +375,11 @@ in
           set -eu
           set -o pipefail
 
+          # This code explicitly requires GNU Core Utilities and Bash.
+          # We therefore need to ensure they are prioritized over any
+          # other similarly named tools on the system.
+          export PATH="${pkgs.coreutils}/bin:${pkgs.bash}/bin:$PATH"
+
           . ${./lib-bash/color-echo.sh}
 
           ${builtins.readFile ./lib-bash/activation-init.sh}