Skip to content

Commit

Permalink
nix-on-droid: warn on switching with flake.nix w/o --flake
Browse files Browse the repository at this point in the history
Fixes: #295
  • Loading branch information
t184256 committed Mar 3, 2024
1 parent a19d0bc commit 9d1d08e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nix-on-droid/nix-on-droid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ function doOnDeviceTest() {
}

function doSwitch() {
if [[ -e "$HOME/.config/nix-on-droid/flake.nix" && -z "${FLAKE_CONFIG_URI}" ]]; then
echo -n '~/.config/nix-on-droid/flake.nix exists, '
echo -n "you might've intended to run "
echo '`nix-on-droid switch --flake ~/.config/nix-on-droid`'
fi

echo "Building activation package..."
nixActivationPackage build --no-link

Expand Down

0 comments on commit 9d1d08e

Please sign in to comment.