From 623c979342035d1b4e4756529d09406cadad8215 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 22 May 2024 17:39:12 +0100 Subject: [PATCH] auto: bootstrapping sparky --- scripts/bootstrap.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 2b2b590..406b5fb 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -81,7 +81,9 @@ chmod 644 "$temp/persist/etc/ssh/ssh_host_ed25519_key.pub" # Install Nixos to target cd "$HOME/nixos" -git add . && git commit -m "auto: bootstrapping $hostname" +git add . && git commit -m "auto: bootstrapping $hostname" && git push +[ $? != 0 ] && echo "Error commiting current changes" && exit 1 + SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --extra-files "$temp" --flake .#"$config" root@"$ip" -i "$HOME/.ssh/id_ed25519" [ $? != 0 ] && echo "Error installing Nixos" && exit 1