forked from mirrors_public/oddlama_nix-config
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"]}"
|
||||
echo "[1;36m Applying [m⚙️ [34m$host[m"
|
||||
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" -- "$store_path"/bin/switch-to-configuration "$ACTION"
|
||||
ssh "$host" -- /run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set "$store_path" \
|
||||
|| 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
|
||||
ssh "$host" -- nvd --color always diff "$prev_system" "$store_path"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue