Last active
August 14, 2022 17:41
-
-
Save hunterloftis/53b62f8445d7b77ee2cf81850487fff0 to your computer and use it in GitHub Desktop.
steam deck custom setup for development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
# Idempotent deck setup script | |
# Expects to live with other dotfiles: | |
# - ~/.bashrc | |
# - ~/.flat/docker | |
# - ~/.flat/docker-compose | |
# ref: https://askubuntu.com/a/30157/8698 | |
if ! [ $(id -u) = 0 ]; then | |
echo "run with sudo (set password first with passwd)" >&2 | |
exit 1 | |
fi | |
# DANGER ZONE | |
steamos-readonly disable | |
pacman-key --init | |
pacman-key --populate archlinux | |
# install openvpn & podman (& pip & podman-dnsname for podman-compose) | |
pacman -S networkmanager-openvpn podman podman-dnsname python-pip | |
touch /etc/subuid | |
usermod --add-subuids 10000-75535 deck | |
touch /etc/subgid | |
usermod --add-subgids 10000-75535 deck | |
# add docker.io as a registry since redhat is silly | |
printf "[registries.search]\\nregistries = ['docker.io']\\n" > /etc/containers/registries.conf | |
# allow flatpak to access /tmp, required for vscode devcontainers | |
flatpak override --filesystem=/tmp | |
steamos-readonly enable | |
# /DANGER ZONE | |
# required to use the uids set above | |
podman system migrate | |
# install podman-compose | |
pip3 install podman-compose | |
# install vscode, chrome, godot | |
flatpak update | |
flatpak install org.chromium.Chromium | |
flatpak install com.visualstudio.code | |
flatpak install org.godotengine.Godot | |
# install vscode extensions | |
flatpak run --command=code org.visualstudio.code --install-extension ms-vscode-remote.vscode-remote-extensionpack | |
# download NordVPN's openvpn configs | |
mkdir ~/ovpn | |
curl https://downloads.nordcdn.com/configs/archives/servers/ovpn.zip --output /tmp/ovpn.zip | |
unzip /tmp/ovpn.zip -d ~/ovpn | |
# bitwarden chrome extension | |
xdg-open 'https://chrome.google.com/webstore/detail/bitwarden-free-password-m/nngceckbapebfimnlniiiahkandclblb?hl=en' | |
echo 'Manual TODOs:' | |
echo '1. install bitwarden and copy your SSH keys into ~/.ssh' | |
echo '2. chmod 600 ~/.ssh/* && chmod 700 ~/.ssh' | |
echo '3. open network connection settings and add a new VPN connection using a file in ~/ovpn/udp' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment