Nix-ifying Steam depots for dedicated game-servers


I’d be interested in applying Nix to Steam depots to download game-server contents and allow for easy installation using NixOS modules, has any work done in that regard? If not, I will proceed whenever I can allot time.


1 Like

Does steam even allow downloading the (free) data over https, for example?

I know of SteamCMD, GitHub - SteamRE/DepotDownloader: Steam depot downloader utilizing the SteamKit2 library. or even Steam Community :: Guide :: How to Download Older Versions of a Steam Game but the latter solution seems painful.
I don’t think they operate over HTTP but I’m not sure yet.

Any nix-packagable SW doing the download should be OK, though fetchurl would be simpler…

I have a PR open for SteamCMD: steamcmd: init at 20180104 by tadfisher · Pull Request #38878 · NixOS/nixpkgs · GitHub

With this it would be feasible to add a fetchSteam function. The download_depot command is supported for fetching a pinned depot.

If you want to support non-free games, you’d have to require a login/password/steam-guard-id, which wouldn’t be feasible synchronously in a Nix evaluation, but it could certainly read from an external file.

I’ve been packaging various games for Nix for a while, including fetchSteam based on DepotDownloader. If it helps I could clean it up and contribute it to nixpkgs.

Here is the implementation (as said, needs a bit of polishing): vuizvui/pkgs/games/steam/fetchsteam at c4429caf0224e928b34c8acc1c3d17e0b2a9673a · openlab-aux/vuizvui · GitHub


I am also looking for a Nix solution to manage Steam game servers.

Would it be possible to build something around steamcmd ?

I don’t have any experience with custom NixOS builders, do you have any recommendations on some existing code to read ? Maybe fetchurl ?

Did anyone have success running dedicated game-servers on Nixos? I can’t get the CS2 game server to run at all. It seems to be missing some libs even with steam-run

I’ve run a handful over the years with SteamCMD to acquire the data and steam-run to wrap the binary, on NixOS with or without systemd units. Satisfactory and ECO were the two latest and worked almost OOTB in that combination. Never picked out a Valve game in particular, though.