auto: bootstrapping sparky
This commit is contained in:
parent
7bb5689128
commit
b7d7f40171
|
@ -228,11 +228,11 @@
|
||||||
"nix-secrets": {
|
"nix-secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716726210,
|
"lastModified": 1716726314,
|
||||||
"narHash": "sha256-usCA/GuvvERo5tcSIYFet5sF0GhKdewcbHfJNNsnNrw=",
|
"narHash": "sha256-51OoLeW7G0MgtY6veCsbPxN+SMg6RjMzNAj9jb0QWNk=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "2cead67c686ddfb8c5c450ab5b56c545b661005c",
|
"rev": "1260e25cdc7057ca61f947ec67b3aaf4de013852",
|
||||||
"revCount": 39,
|
"revCount": 40,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
"url": "ssh://git@git.bitlab21.com/sam/nix-secrets.git"
|
||||||
},
|
},
|
||||||
|
|
|
@ -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.
|
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
|
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.
|
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
|
[ "$confirm" != "yes" ] && echo "Exiting" && exit 0
|
||||||
|
|
||||||
hostname="sparky"
|
hostname="sparky"
|
||||||
ip="192.168.122.192"
|
ip="192.168.122.193"
|
||||||
config="bootstrap"
|
config="bootstrap"
|
||||||
|
|
||||||
# Delete key in known hosts if exists
|
# 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
|
# Authorise source public key
|
||||||
echo "Copying pubkey to target host"
|
echo "Copying pubkey to target host"
|
||||||
|
|
Loading…
Reference in New Issue