X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Fsetup_home.sh;h=e6abd78b07e52049759a23d12357b64d0d9831d8;hb=7148c90687f1d47e526fa582e70cb065d00b85aa;hp=b02ef6d17631854814cfa7c6e09e525fb3737f4b;hpb=d781128ab64a3247b66313120d05ab4eef4a4059;p=config diff --git a/buster/setup_scripts/setup_home.sh b/buster/setup_scripts/setup_home.sh index b02ef6d..e6abd78 100755 --- a/buster/setup_scripts/setup_home.sh +++ b/buster/setup_scripts/setup_home.sh @@ -32,6 +32,18 @@ ensure_repo() { fi } +# Set up iniitial non-public parts of infrastructure: SSH authentication. +cd "${dir_secrets}" +mkdir -p "${ssh_dir}" +echo "Setting up .ssh" +cp id_rsa ~/.ssh +stty -echo +ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub +stty echo +eval $(ssh-agent) +ssh-add +ssh-keyscan -H "plomlompom.com" >> ~/.ssh/known_hosts + # Clone config to copy dotfiles etc. from it. cd mkdir -p "${public_repos_dir}" @@ -42,14 +54,8 @@ cd "${setup_scripts_dir}" # Set up native messenger for tridactyl. curl -fsSl https://raw.githubusercontent.com/tridactyl/tridactyl/78e662efefd1f4af2bdb2a53edecf03b535b997b/native/install.sh | bash -# Set up non-public parts of infrastructure. +# Set up further non-public parts of infrastructure. cd "${dir_secrets}" -mkdir -p "${ssh_dir}" -echo "Setting up .ssh" -cp id_rsa ~/.ssh -stty -echo -ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub -stty echo script -c 'gpg --import secret_keys.asc' /dev/null tar xf borg_keyfiles.tar mkdir -p "${borgkeys_dir}"