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