Workstation setup scripts. All roles (except the private one) are now migrated to My (Ansible) Galaxy.
- Packages
- git - sudo - ssh and ssh-agent - sudo
- Credentials directory
- Local account with
sudo
no password (Or useinit/sudoer.sh
)
mkdir ~/myhome
Note: I do not back up the whole home directory, but put everything into ~/myhome
instead to clean up the mess left by applications when reinstalling the OS.
CREDENTIALS_BACKUPPATH=/path/to/backup/creds
CREDENTIALS_PATH=/path/to/credentials-store
cp $CREDENTIALS_BACKUPPATH $CREDENTIALS_PATH
CREDENTIALS_PATH=/path/to/credentials-store
SSH_KEY="${CREDENTIALS_PATH}/path-to-ssh-key"
eval "$(ssh-agent)"
ssh-add -f "${CREDENTIALS_PATH}"
# adding ssh config
cat > ~/.ssh/config <<-EOF
Host github.com
HostName github.com
User git
IdentityFile $SSH_KEY
EOF
Clone this repo and initialize home-config-ansible-private, mygalaxy.
cd ~/myhome
git clone [email protected]:novicecpp/home-config-ansible.git
cd home-config-ansible
git submodule update --init
# install galaxy deps and symlink mygalaxy to ~/.ansible
bash mygalaxy/install.sh
Clone home-config and home-config-private to ~/myhome
.
cd ~/myhome
git clone [email protected]:novicecpp/home-config.git
cd home-config
git submodule update --init
cd ~/myhome/home-config-ansible
bash pyenv_init.sh
cd ~/myhome/home-config-ansible
source .venv/bin/activate # sourcing venv
bash example_run.sh # Switch playbook and inventory to the machine you run in the script.
TBD
For Lenovo X1/P1 Gen 2,
- Remove power cord.
- Restart.
- Open bios menu > Power > Turn of built-in battery.
- wait 5 seconds.
- Plug in power cord, open laptop.