Ansible playbook to install Arch Linux on a laptop and configure Steam Deck in desktop mode.
Create a Python virtual environment and install the dependencies.
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install ansible
Download the latest Arch Linux ISO and write it to a USB stick.
dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/sdx conv=fsync oflag=direct status=progress
Connect to the Internet: https://wiki.archlinux.org/title/Iwd#iwctl
root@archiso# iwctl
[iwd]# station wlan0 connect CMCMT
When the Arch Linux Live is ready, start the ssh server and set the root password.
root@archiso# systemctl start sshd
root@archiso# passwd
Run the playbooks to install the minimal Arch Linux system needed to start the laptop.
$ ansible-playbook -i laptop/inventory.ini --vault-password-file .vault-password-file laptop/000-platform-base.yaml -k
$ ansible-playbook -i laptop/inventory.ini --vault-password-file .vault-password-file laptop/010-configure-chroot-env.yaml -k
Exit the chroot environment and reboot the laptop.
root@archiso# arch-chroot /mnt
root@archiso# passwd
root@archiso# exit
root@archiso# reboot
After installing Arch Linux, run the playbooks to configure the laptop.
Connect to the Internet: https://wiki.archlinux.org/title/Iwd#iwctl
root@host# systemctl start iwd
root@host# iwctl
[iwd]# station wlan0 connect CMCMT
[iwd]# exit
root@host# dhcpclient wlan0
The first one needs access by root.
# vim /etc/ssh/sshd_config
$ ansible-playbook -i inventory.ini --vault-password-file .vault-password-file archlinux/000-base.yaml -k
Now, we can remove the access given in the previous step. And run the rest of the playbooks.
$ ansible-playbook -i inventory.ini --vault-password-file .vault-password-file archlinux/100-configure-arch-linux.yaml -kK
SteamOS comes pre-installed and pre-configured by default. To use the Steam Deck as a desktop, we need activate it.
$ ansible-playbook -i inventory.ini --vault-password-file .vault-password-file steam-deck/playbook.yaml -kK
And configure our personal settings.
$ ansible-playbook -i inventory.ini --vault-password-file .vault-password-file archlinux/100-configure-arch-linux.yaml -kK