diff --git a/deploy.sh b/deploy.sh index 5cf52a3..5322c80 100644 --- a/deploy.sh +++ b/deploy.sh @@ -102,6 +102,15 @@ necessary_information_config() { echo -e "\nāŒ Please check your configuration file to include all necessary variables" exit 1 fi + + if [[ "${DEBUG:-false}" == "true" ]]; then + echo "Debugging enabled." + export DIR_COPY_FLAGS="ravu" + export FILES_COPY_FLAGS="avu" + else + export DIR_COPY_FLAGS="rau" + export FILES_COPY_FLAGS="au" + fi } more_information_config() { @@ -1000,15 +1009,6 @@ EOF sleep 1 -if [[ "${DEBUG:-false}" == "true" ]]; then - echo "Debugging enabled." - DIR_COPY_FLAGS="ravu" - FILES_COPY_FLAGS="avu" -else - DIR_COPY_FLAGS="rau" - FILES_COPY_FLAGS="au" -fi - # Choose the action ACTION_ANSWER=$(gum choose "[1] 🌐 Deploy NixOS on a remote machine" "[2] šŸ’½ Deploy NixOS on a remote machine with a file configuration" "[3] šŸ› ļø Update a NixOS remote machine")