nix-on-droid: warn on switching with flake.nix w/o --flake

Fixes: #295
This commit is contained in:
Alexander Sosedkin 2024-03-03 11:31:49 +01:00
parent 94bf554ee9
commit c33e249719

View file

@ -101,6 +101,12 @@ function doOnDeviceTest() {
} }
function doSwitch() { 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..." echo "Building activation package..."
nixActivationPackage build --no-link nixActivationPackage build --no-link