Running Nixos on steamdeck come up as surprising necessity when I went for month long work retreat to Thailand. My workflow is composed of great and super lightweight Lenovo X1 Nano and remote workstation sitting in my office. Neovim running in ssh session with some port forwarding is all I need for my development, more about it some other post. But when I settled to the airbnb and fired up my laptop to do some work I was greeted by around 200ms ping to the office, not really acceptable for any serious work since every keystoke was like I was typing in slow motion. Ok so what’s the big deal, you had your laptop with you, just work on that. I want to, but that thing is not more powerful then raspberry pi, so when you open firefox, dbeaver and some tools it’s already sweating, let alone when I start up the few services required for my work. So I had to figure out plan B.
Plan B
Luckily I’ve had my Steam deck with me, and that thing pack quite a punch. But of course I didn’t want to install all the dependencies and tools required for the development directly onto the SteamOS,
besides there are some serious restriction when it comes to installing non steam thing onto it. My solution was to create a virtual machine and run stripped down version of my workstations OS on it. This is were Nixos shines,
thanks to it’s declarative configuration I was able to prepare iso without graphical interface on it in minutes. Not the only thing left was to fire up virtual machine with it and I was of to the races. That proved to be harder then expected.
SteamOS is based on arch linux, so I hoped I would just pacman -S qemu
and everything would work out, but SteamOS is by default read only to prevent users messing up the system.
You can remove the read only protection by most things are wiped when the os is updated, not ideal, but would probably work for the time being. But I wasn’t happy with this solution.
One folder that’s never wiped my the update is user home folder. However most package managers are not using it and you cannot just reconfigure them, but there’s one. One I didn’t even know works on linux.
Brew
Brew is surprisingly not MacOS only package manager. The support for linux is limited but luckily the qemu package is provided also for linux. Using qemu directly wasn’t my fist choice since I was unfamiliar with it. But I wasn’t able to find any gui or helper tools that I would be able to easily install onto steam deck. Even starting the virtual machine was a challenge but mainly because I didn’t know what I was doing. In the end I create a disk image that was stored on external ssd disk, which I connected everytime I wanted to switch from gaming to work, installed nixos and I was ready to work.
Experience
As unconventional portable workstation the Steam deck in combination with external ssd and lightweight laptop is surprisingly good. I didn’t have any issues the whole month and my workflow was totally unchanged. And it’s nice that the laptop stays cool and quiet, since tropical weather was a challenge for it without running anything. This goes to show how great and versatile linux can be. Cannot image being able to do this so easily on Windows base handheld, but who knows.