From 27968d69ba4fa520bc18d039862bc64e69b2b472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Wed, 11 Jun 2025 21:38:23 +0200 Subject: [PATCH] fix: remove dirchange in swarsel-deploy --- SwarselSystems.org | 5 ++--- pkgs/swarsel-deploy/default.nix | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index 7e05339..1823802 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -3727,7 +3727,6 @@ AppImage version of mgba in which the lua scripting works. T_START="$T_END" } - cd ~/.dotfiles USER_FLAKE_DIR=$(git rev-parse --show-toplevel 2> /dev/null || pwd) || die "Could not determine current working directory. Something went very wrong." [[ -e "$USER_FLAKE_DIR/flake.nix" ]] || @@ -3774,7 +3773,8 @@ AppImage version of mgba in which the lua scripting works. declare -A TOPLEVEL_STORE_PATHS for host in "''${HOSTS[@]}"; do toplevel="''${TOPLEVEL_FLAKE_PATHS["$host"]}" - echo " Building 📦 $host" + # Make sudo call to get prompt out of the way + sudo echo " Building 📦 $host" nix build --no-link "''${OPTIONS[@]}" --show-trace --log-format internal-json -v "$toplevel" |& ${nix-output-monitor}/bin/nom --json || die "Failed to get derivation path for $host from ''${TOPLEVEL_FLAKE_PATHS["$host"]}" TOPLEVEL_STORE_PATHS["$host"]=$(nix build --no-link --print-out-paths "''${OPTIONS[@]}" "$toplevel") @@ -3812,7 +3812,6 @@ AppImage version of mgba in which the lua scripting works. time_next echo -e "\033[1;32m Applied \033[m✅ \033[34m$host\033[m \033[90min ''${T_LAST}s\033[m" done - cd - ''; } diff --git a/pkgs/swarsel-deploy/default.nix b/pkgs/swarsel-deploy/default.nix index fb197e4..a40a98b 100644 --- a/pkgs/swarsel-deploy/default.nix +++ b/pkgs/swarsel-deploy/default.nix @@ -34,7 +34,6 @@ writeShellApplication { T_START="$T_END" } - cd ~/.dotfiles USER_FLAKE_DIR=$(git rev-parse --show-toplevel 2> /dev/null || pwd) || die "Could not determine current working directory. Something went very wrong." [[ -e "$USER_FLAKE_DIR/flake.nix" ]] || @@ -81,7 +80,8 @@ writeShellApplication { declare -A TOPLEVEL_STORE_PATHS for host in "''${HOSTS[@]}"; do toplevel="''${TOPLEVEL_FLAKE_PATHS["$host"]}" - echo " Building 📦 $host" + # Make sudo call to get prompt out of the way + sudo echo " Building 📦 $host" nix build --no-link "''${OPTIONS[@]}" --show-trace --log-format internal-json -v "$toplevel" |& ${nix-output-monitor}/bin/nom --json || die "Failed to get derivation path for $host from ''${TOPLEVEL_FLAKE_PATHS["$host"]}" TOPLEVEL_STORE_PATHS["$host"]=$(nix build --no-link --print-out-paths "''${OPTIONS[@]}" "$toplevel") @@ -119,6 +119,5 @@ writeShellApplication { time_next echo -e "\033[1;32m Applied \033[m✅ \033[34m$host\033[m \033[90min ''${T_LAST}s\033[m" done - cd - ''; }