mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
activation-checks: add NIX_PATH check for darwin-config
This commit is contained in:
parent
05d8495ed8
commit
345d9ffa0e
1 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,16 @@ let
|
|||
'';
|
||||
|
||||
nixPath = optionalString true ''
|
||||
darwinConfig=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin-config>')
|
||||
if [ -z $darwinPath ]; then
|
||||
echo "[1;31merror: Changed <darwin-config> but target does not exist, aborting activation[0m" >&2
|
||||
echo "Move you configuration.nix or set NIX_PATH:" >&2
|
||||
echo >&2
|
||||
echo " nix.nixPath = [ \"darwi-config=${builtins.toString <darwin-config>}\" ];" >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
darwinPath=$(NIX_PATH=${concatStringsSep ":" config.nix.nixPath} nix-instantiate --eval -E '<darwin>')
|
||||
if [ -z $darwinPath ]; then
|
||||
echo "[1;31merror: Changed <darwin> but target does not exist, aborting activation[0m" >&2
|
||||
|
|
Loading…
Add table
Reference in a new issue