A user on the NixOS GitHub filed an issue asking for Nix package support for the Steam Deck. “The Steam Deck has limited possibilities in extending it with your own software due to its read-only rootfs. You can’t just install Arch packages via pacman for instance,” they mentioned. “Flatpak is installed and enabled by default and it covers GUI apps fairly well but it doesn’t cover CLI apps at all. Nix could really shine here.”
Well, fast forward several months later, a SteamOS developer by the name of “Nephyrin” confirmed that Nix support will be provided with the upcoming SteamOS 3.5 build:
SteamOS 3.5 will have a
/nix/directory available. Currently the nix package is not pre-installed, however.
Here’s what they said regarding whether the user will have to mount their own partition:
It is currently bind-mounted to the data partition at
/home/.steamos/offload/nix/along with other ‘offload’ directories that are independent of OS update (unlike the small/volaile
/varwhich undergoes a selective migration on update).
There may also be a
/gnu mount, depending on whether Guix developers have interest.
This is great news. With this addition, users will no longer have to unlock the Deck’s immutable file system to install packages. Packages outside of the Discover store can be installed and will still remain present on the OS across updates.
If you want to try this out now, you can opt into the
Main branch on your Steam Deck. I’d personally wait until SteamOS 3.5 becomes official though.