mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
fix(deploy): continue after apply error
This commit is contained in:
parent
5bcf5c8100
commit
862cd1c7b5
1 changed files with 4 additions and 2 deletions
|
@ -102,8 +102,10 @@
|
||||||
store_path="''${TOPLEVEL_STORE_PATHS["$host"]}"
|
store_path="''${TOPLEVEL_STORE_PATHS["$host"]}"
|
||||||
echo "[1;36m Applying [m⚙️ [34m$host[m"
|
echo "[1;36m Applying [m⚙️ [34m$host[m"
|
||||||
prev_system=$(ssh "$host" -- readlink -e /nix/var/nix/profiles/system)
|
prev_system=$(ssh "$host" -- readlink -e /nix/var/nix/profiles/system)
|
||||||
ssh "$host" -- /run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set "$store_path"
|
ssh "$host" -- /run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set "$store_path" \
|
||||||
ssh "$host" -- "$store_path"/bin/switch-to-configuration "$ACTION"
|
|| die "Failed to set system profile"
|
||||||
|
ssh "$host" -- "$store_path"/bin/switch-to-configuration "$ACTION" \
|
||||||
|
|| echo "Error while activating new system" >&2
|
||||||
if [[ -n "$prev_system" ]]; then
|
if [[ -n "$prev_system" ]]; then
|
||||||
ssh "$host" -- nvd --color always diff "$prev_system" "$store_path"
|
ssh "$host" -- nvd --color always diff "$prev_system" "$store_path"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue