default bootstrap password think this is required pw update pseudoterm change pw
23 lines
No EOL
404 B
Bash
Executable file
23 lines
No EOL
404 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Parameters
|
|
ip=$1
|
|
if [ -z "$ip" ]; then
|
|
echo "Usage: $0 <ip>"
|
|
exit 1
|
|
fi
|
|
|
|
# This script is used to bootstrap nixos machine so I can get their ssh keys
|
|
|
|
nix run \
|
|
github:nix-community/nixos-anywhere \
|
|
-- \
|
|
--flake '.#bootstrap' \
|
|
--target-host root@$ip \
|
|
--build-on-remote
|
|
|
|
ret=$?
|
|
if [ $ret -ne 0 ]; then
|
|
echo "Failed to bootstrap $ip"
|
|
exit $ret
|
|
fi |