diff --git a/pkgs/nix-tools/darwin-rebuild.sh b/pkgs/nix-tools/darwin-rebuild.sh index 4f9213c3..bcbb3196 100644 --- a/pkgs/nix-tools/darwin-rebuild.sh +++ b/pkgs/nix-tools/darwin-rebuild.sh @@ -114,10 +114,14 @@ if [ "$action" = list -o "$action" = rollback ]; then fi fi -if [ "$action" = activate -o "$action" = rollback -o "$action" = check ]; then +if [ "$action" = rollback -o "$action" = check ]; then systemConfig="$(cat $profile/systemConfig)" fi +if [ "$action" = activate ]; then + systemConfig=$(readlink -f "${0%*/sw/bin/darwin-rebuild}") +fi + if [ -z "$systemConfig" ]; then exit 0; fi if [ "$action" = switch ]; then