Skip to content Skip to footer
Persistent packages on Steam Deck using Nix by Rikudou

Persistent packages on Steam Deck using Nix by Rikudou

9 Comments

  • Post Author
    metadat
    Posted February 9, 2025 at 6:49 pm

    I didn't realize you could install Nix on any Linux distro. It actually looks really straightforward:

    https://forum.elivelinux.org/t/how-to-install-nix-packages-o…

    I'm giving it a go now in the easily undoable single-user "no-daemon" mode.

    Super excited how approachable this makes Nix, I've put this off for many years due to what turned out to be an incorrect assumption about the level of commitment!

  • Post Author
    talldayo
    Posted February 9, 2025 at 7:00 pm

    This is actually a bit of a match made in heaven for Nix. The Steam Deck runs Arch with immutable root, which means most of the AUR packages won't entirely work. So you need a package manager which respects immutable root, supports atomic upgrades with Arch and has a package selection similar to the AUR. There are a few options, but the best one really is Nix: https://repology.org/repositories/statistics/newest

    Given that package management on the Deck is traditionally handled with Flatpak, Nix seems like a great alternative for power users with storage to spare.

  • Post Author
    colordrops
    Posted February 9, 2025 at 7:01 pm

    Would love if there was a Nix flake for setting up retro gaming. Last time I checked you had to install these complicated tools and set them up manually.

  • Post Author
    jquaint
    Posted February 9, 2025 at 7:19 pm

    Love using Nix for retro gaming setups. Its great to bundle drivers, emulators, etc.

    https://nixos.wiki/wiki/RetroArch
    https://nixos.wiki/wiki/Playstation2

  • Post Author
    craftkiller
    Posted February 9, 2025 at 7:42 pm

    This is great. Nix made compiling ship of harkinian (ocarina of time pc port), 2ship2harkinian (majora's mask pc port) and sm64ex (super mario 64 pc port) trivial on nixos but where I really want them is on my steam deck. Now I can.

  • Post Author
    bsimpson
    Posted February 9, 2025 at 7:52 pm

    > you can either run NixOS (which isn’t ideal on a Steam Deck)

    I've actually been using NixOS on my Legion Go to give me the SteamOS experience while I wait for the official image from Valve [1].

    I knew that Valve had whitelisted /nix, but seeing how the author explicitly loads Nix in Bash:

        .nix-profile/etc/profile.d/nix.sh
    

    makes me wonder how it works in game mode. Say that someone uses Nix to install a game like YARG that's not in the Steam store [2]. That will install the game to /nix/store and write an alias to the user's desktop. /home/deck is not immutable, so you could add the desktop file as a non-Steam game, and everything will work as expected, right?

    What are the boundaries between things that work everywhere, things that only work after you've loaded a bash profile (e.g. from a terminal), and things that only work in NixOS? What if a package wants to run at login? What if it uses its own systemd rules?

    [1] https://github.com/Jovian-Experiments/Jovian-NixOS/

    [2] https://news.ycombinator.com/item?id=42991513

  • Post Author
    486sx33
    Posted February 9, 2025 at 8:06 pm

    Not to be confused with *nix
    (Meaning any Linux or Unix)

  • Post Author
    ilrwbwrkhv
    Posted February 9, 2025 at 8:18 pm

    I bought 20 Steam Decks recently to give to one of my teams. Will share this with them.

  • Post Author
    sweeter
    Posted February 9, 2025 at 8:30 pm

    Nix is great on the steam deck in so many ways. I use home manager just to install my general development environment, but at the same time there are some issues. like the sleep/suspend button will often cause the Nix Daemon socket to stop working, and you and you have to restart it, which can be kind of hard if you don't have access to SSH or whatever.

Leave a comment

In the Shadows of Innovation”

© 2025 HackTech.info. All Rights Reserved.

Sign Up to Our Newsletter

Be the first to know the latest updates

Whoops, you're not connected to Mailchimp. You need to enter a valid Mailchimp API key.