auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-22 17:39:12 +01:00
parent 9ded1a9371
commit 623c979342
1 changed files with 3 additions and 1 deletions

View File

@ -81,7 +81,9 @@ chmod 644 "$temp/persist/etc/ssh/ssh_host_ed25519_key.pub"
# Install Nixos to target # Install Nixos to target
cd "$HOME/nixos" 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" 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 [ $? != 0 ] && echo "Error installing Nixos" && exit 1