From e4f697a17c8678a848ee9bc12324b6e1a79ee078 Mon Sep 17 00:00:00 2001 From: Steven Pease Date: Sun, 31 Oct 2021 12:33:14 -0700 Subject: [PATCH] Guard against double-sourcing --- modules/environment/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/environment/default.nix b/modules/environment/default.nix index 601b0ca8..9544937b 100644 --- a/modules/environment/default.nix +++ b/modules/environment/default.nix @@ -184,6 +184,7 @@ in system.build.setEnvironment = pkgs.writeText "set-environment" '' # Prevent this file from being sourced by child shells. + if [ -n "${__NIX_DARWIN_SET_ENVIRONMENT_DONE:-}" ]; then return; fi export __NIX_DARWIN_SET_ENVIRONMENT_DONE=1 export PATH=${config.environment.systemPath}