Written for Ubuntu 2 8362 2.04 LTS.
- First, make sure to update then restart:
sudo apt update -y && sudo apt upgrade -y;
sudo reboot now
- Now install
git
andansible
:
sudo apt install git gh ansible -y
- Clone the repo:
git clone https://github.com/Phelz/machine_setup
- Then run the ansible playbook via:
sudo ansible-playbook -v setup.yml --become-user=USERNAME --ask-become-pass
sudo echo hi && ansible-playbook setup.yml -e "target_user=philo" -v
replacing USERNAME
. The --ask-become-pass
option prompts you for your password, and will enable you to authenticate yourself, as some processes require run-time validation.
- Setup SSH. The
setup.sh
script does that and also initializes the github authentication process.
-
Setup SSH keys from other devices by adding them to the
$HOME/.ssh/authorized_keys
file. -
Disable the
PermitRootLogin
andPasswordAuthentication
options in the/etc/ssh/sshd_config
file. Then runsudo systemctl restart sshd
. Make sure you can login via your SSH Key first before disabling these options. -
Install GPU drivers.
-
Link Google account.
-
Setup an SSH Key and add it to my github account. This part is done by
- Generating an SSH Key:
ssh-keygen -t ed25519 -C "philogeee@gmail.com"
- Checking the ssh agent:
eval "$(ssh-agent -s)"
- Adding the private key to the agent:
ssh-add ~/.ssh/KEY_ID
- Using
gh auth login
alongside a personal access token or via browser, setting SSH as the preferred protocol.
replacing
KEY_ID
with your key and `YOUR_TITLE' with whatever name you want. - Generating an SSH Key:
I recommend doing this process before cloning the repo. Then you can clone via SSH (instead of having to switch the HTTPS remote later on when trying to edit the repo).
- Run commmand
ansible-playbook setup.yml --extra-vars "target_user=philo" -v
replacing "philo" with your "username". Before doing this however, make sure you've run some command with sudo, something like:
sudo echo hi;
ansible-playbook setup.yml --extra-vars "target_user=philo" -v
Might be asked for a password a couple times during the installation.
Set the $XDG_CONFIG_HOME
directory to be $HOME/.config
so that all dotfile configurations are there. To do so, add these lines to the .zshenv
file in the $HOME
directory:
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$XDG_CONFIG_HOME/local/share"
export XDG_CACHE_HOME="$XDG_CONFIG_HOME/cache"
git clone https://github.com/tmux-plugins/tpm $XDG_CONFIG_HOME/tmux/plugins/tpm