๐๏ธ Ansible playbook to set up dev machine
- Add SSH key from local machine to GitHub.
- Ensure SSH key in running agent:
eval $(ssh-agent -s) && ssh-add ~/.ssh/id_rsa - Clone repo:
git clone git@github.com:nixpig/playbook.git && cd $_ - Install pre-requisite packages:
./install.sh - Run playbook:
ansible-playbook local.yml --ask-vault-pass --ask-become-pass
Note: when installing in default Arch running on WSL2, may need to also set LC_ALL="C.UTF-8".
- Boot from install image
- Set keyboard layout:
loadkeys uk - Set root password:
passwd - Partition hard disk:
- Run partitioning utility:
fdisk - Add a new EFI boot partition:
n - Select primary:
p - Set partition number:
1 - Set first sector:
2048 - Set last sector:
+512M - Add a new root partition:
n - Select primary:
p - Set partition number:
2 - Set first sector as default:
<enter> - Set last sector as default:
<enter> - Write the partition table:
w - Format partitions:
- Format EFI partition as FAT:
mkfs.fat /dev/sda1 - Format the root partition as ext4:
mkfs.ext4 /dev/sda2 - Mount the partitions:
- Mount root partition:
mount /dev/sda2 /mnt - Create mount point for EFI boot partition:
mkdir /mnt/boot - Mount the EFI boot partition:
mount /dev/sda1 /mnt/boot - Bootstrap the base system:
pacstrap /mnt base linux linux-firmware dhcpcd openssh vim..
-
Install kernel headers:
pacman -S linux-rt-headers -
Install virtualbox:
pacman -S virtualbox -
Load modules:
modprobe vboxdrv -
Install vagrant: from Hashicorp package - pacman version is outdated and doesn't work
-
Add user to group:
usermod -aG vboxusers $USER -
Reboot!