Skip to content

Instantly share code, notes, and snippets.

@sanyer
Last active July 8, 2024 05:37
Show Gist options
  • Save sanyer/ce815296bc4fac38752673d20e7fb3f2 to your computer and use it in GitHub Desktop.
Save sanyer/ce815296bc4fac38752673d20e7fb3f2 to your computer and use it in GitHub Desktop.
Awesome Steam Deck

Awesome Steam Deck

Here I'm gathering awesome things to do with Steam Deck.

Resource:

Basic

Create a password for the deck user

passwd

Unlock root filesystem and init pacman

sudo steamos-readonly disable
sudo pacman -Syyu  # upgrade system
sudo pacman -Scc  # cleanup cache
sudo pacman -Sy archlinux-keyring
sudo pacman-key --init
sudo pacman-key --populate archlinux

Install and use konsave

python3 -m pip install --user pipx
python3 -m pipx ensurepath
python3 -m pip install --user --upgrade pipx
pipx install konsave
konsave --import-profile steam-deck.knsv 
konsave --apply steam-deck

Install and configure fish shell

sudo pacman -S fish
fish
curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

# fish shell extensions
fisher install jorgebucaran/nvm.fish

Mimic fish in zsh

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-history-substring-search ~/.zsh/zsh-history-substring-search
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
cat <<EOF >>~/.zshrc
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
source ~/.zsh/zsh-history-substring-search/zsh-history-substring-search.zsh
EOF

Starship: Cross-Shell Prompt

curl -sS https://starship.rs/install.sh | sh -s -- --yes --bin-dir /home/.deck/.local/bin

# for fish
echo 'starship init fish | source' >> ~/.config/fish/config.fish
# zsh
echo 'eval "$(starship init zsh)"' >> ~/.zshrc:

Configure vim

git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/dist/start/vim-airline
# or
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_basic_vimrc.sh

Change default user shell

sudo usermod --shell $(which zsh) deck

Install fonts

cd ~/Downloads
yay --getpkgbuild otf-operator-mono
cd otf-operator-mono
wget -O operator-mono.zip https://github.com/keyding/Operator-Mono/archive/refs/heads/master.zip
unzip -j operator-mono.zip
makepkg -sci BUILDDIR=.
git clone https://github.com/cancng/fonts.git
cd fonts
chmod +x install.sh
./install.sh 

Install yay

pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay-bin.git
cd yay-bin
makepkg -si

Install docker and k3s

# install Docker:
curl -fsSL https://get.docker.com | sh

# install k3s:
curl -sfL https://get.k3s.io | sh -s - --docker --disable=traefik --write-kubeconfig-mode=644

# install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
mkdir -p ~/.local/bin
mv ./kubectl ~/.local/bin/kubectl

# sudo pacman -S docker
sudo usermod -a -G docker deck

Advanced

SSHd

Start temporary ssh server

/usr/sbin/sshd -dD -h ~/.ssh/id_rsa -p 22

Enable sshd service

/usr/bin/steamos-polkit-helpers/steamos-enable-sshd

Configure authenticated keys

tmpfile=$(mktemp /tmp/ssh-key.XXXXXX)
cat <<EOF >$tmpfile
ssh-rsa ...
EOF
/usr/share/steamos-devkit/hooks/install-ssh-key $tmpfile deck
rm $tmpfile

Software

Sublime Text

Flathub has only version 3.x of Sublime Text, let's install latest version from official repo.

curl -O https://download.sublimetext.com/sublimehq-pub.gpg
sudo pacman-key --add sublimehq-pub.gpg
sudo pacman-key --lsign-key 8A8F901A
rm sublimehq-pub.gpg
echo -e "\n[sublime-text]\nServer = https://download.sublimetext.com/arch/stable/x86_64" | sudo tee -a /etc/pacman.conf
sudo pacman -Syu sublime-text

Visual Studio Code

Since flathub apps runs in sandbox, VSCode fuctionality is quite limited, let's install proper version.

sudo pacman -S fakeroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment