From 7750896cc7d4d5b1d14e2d81d0ffd90c157cbccd Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 26 Aug 2018 14:47:40 +0200 Subject: [PATCH] checks: update and improve darwin-config message Now that environment.darwinConfig exists it's a better choice otherwise multiple NIX_PATH entries need to be added. --- modules/system/checks.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/system/checks.nix b/modules/system/checks.nix index 74bd44e4..a2ccd263 100644 --- a/modules/system/checks.nix +++ b/modules/system/checks.nix @@ -84,9 +84,13 @@ let darwinConfig=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '' || echo '$HOME/.nixpkgs/darwin-configuration.nix') || true if ! test -e "$darwinConfig"; then echo "error: Changed but target does not exist, aborting activation" >&2 - echo "Create $darwinConfig or set nix.nixPath:" >&2 + echo "Create $darwinConfig or set environment.darwinConfig:" >&2 + echo >&2 + echo " environment.darwinConfig = \"$(nix-instantiate --eval -E '' 2> /dev/null || echo '***')\";" >&2 + echo >&2 + echo "And rebuild using (only required once)" >&2 + echo "$ darwin-rebuild switch -I \"darwin-config=$(nix-instantiate --eval -E '' 2> /dev/null || echo '***')\"" >&2 echo >&2 - echo " nix.nixPath = [ \"darwin-config=$(nix-instantiate --eval -E '' 2> /dev/null || echo '***')\" ];" >&2 echo >&2 exit 2 fi