Skip to content

Instantly share code, notes, and snippets.

@jvanveen
Last active March 31, 2023 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jvanveen/ba1332aefb5819aa13443ee095fcfb86 to your computer and use it in GitHub Desktop.
Save jvanveen/ba1332aefb5819aa13443ee095fcfb86 to your computer and use it in GitHub Desktop.
Steamdeck developer setup (Steamos with chroot)
# Source: https://bbs.archlinux.org/viewtopic.php?id=280521
# Enable sudo by going into Settings/Users and setting a password
mkdir ~/code/arch
sudo mount --bind ~/code/arch /mnt # (pacman has trouble measure free disk space without mounting)
sudo pacstrap -KM /mnt base linux linux-firmware neovim reflector # (note that packages will come from steam's repos, which is also why I used -M to avoid inheriting those)
sudo arch-chroot /mnt
reflector > /etc/pacman.d/mirrorlist
nvim /etc/pacman.conf # and enable parallel downloads, color smile
# your keyring will probably be wrong, so rm -rf /etc/pacman.d/gpg then pacman-key --init and pacman-key --populate
pacman -Sy archlinux-keyring
pacman -Syu
# Prepare a script to mount dev chroot; e.g. vim ~/code/dev.sh + chmod +x ~/code/dev.sh
xhost +local:
sudo mount --bind ~/code/arch /mnt
sudo arch-chroot /mnt
# Setup dev environment in chroot
~/code/dev.sh
echo "export DISPLAY=:0" > ~/.bashrc
pacman -Syu nvim code go nodejs npm openssh git zsh base-devel sudo
useradd -m jeroen
passwd jeroen
nvim /etc/sudoers # jeroen ALL=(ALL:ALL) ALL
su jeroen
zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cd ~
echo "prefix=~/.npm" > ~/.npmrc
# Add ~/.npm/bin to .zshrc $PATH
# Add cd /home/jeroen/code to .zshrc
ssh-keygen
mkdir code
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment