auto: bootstrapping sparky

This commit is contained in:
Sam 2024-05-26 13:25:20 +01:00
parent 7bb5689128
commit b7d7f40171
2 changed files with 7 additions and 7 deletions

View File

@ -228,11 +228,11 @@
"nix-secrets": {
"flake": false,
"locked": {
"lastModified": 1716726210,
"narHash": "sha256-usCA/GuvvERo5tcSIYFet5sF0GhKdewcbHfJNNsnNrw=",
"lastModified": 1716726314,
"narHash": "sha256-51OoLeW7G0MgtY6veCsbPxN+SMg6RjMzNAj9jb0QWNk=",
"ref": "refs/heads/master",
"rev": "2cead67c686ddfb8c5c450ab5b56c545b661005c",
"revCount": 39,
"rev": "1260e25cdc7057ca61f947ec67b3aaf4de013852",
"revCount": 40,
"type": "git",
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
},

View File

@ -5,7 +5,7 @@ Before using this tool, ensure that the host has been setup correctly.
Boot the latest Nixos-minimal install ISO on the host and access the tty.
Use 'ip a' to get the ip address, then 'sudo su' to change to root. Finally
Run 'passwd' and set a temporary password (something simple like '1234')
Run 'passwd' and set a temporary password (something simple like '1234')
for the root user.
"
@ -13,11 +13,11 @@ read -p "Confirm host had been setup using the above steps...(yes|no): " confirm
[ "$confirm" != "yes" ] && echo "Exiting" && exit 0
hostname="sparky"
ip="192.168.122.192"
ip="192.168.122.193"
config="bootstrap"
# Delete key in known hosts if exists
sed -i "/$ip/d" ~/.ssh/known_hosts
sed -i "/$ip/d" ~/.ssh/known_hosts
# Authorise source public key
echo "Copying pubkey to target host"