Nix-garrys-mod - Bringing Garry's Mod dedicated servers to Nix/NixOS

Howdy! I’m fairly new to Nix and NixOS, but it very quickly grew on me with how easy it is to set up an entire system with it. I’ve been working on transferring over my server’s configuration to pure Nix, and one issue I needed to solve was moving my Garry’s Mod testing server out of Docker and into my system configuration.

Thus, I present nix-garrys-mod, a set of packages that downloads, patches, and wraps the Garry’s Mod dedicated server software and runtime requirements, provides a simple wrapper for running with a separate writeable data directory, and provides a NixOS module to declaratively configure a Garry’s Mod server.

It’s currently in a very early alpha, so I haven’t got around to writing examples and usage. But I wanted to post it early to solicit some feedback/criticism and see if anyone else is looking for this kind of thing. :slight_smile:


Been doing something similar this week GitHub - surfaceflinger/kinematics: movement oriented cs: source server

1 Like

FWIW you probably still want to sandbox it even if not using Docker. You can use Podman and create the Docker image with Nix, or use bubblewrap, or use the confinement options in the NixOS module for systemd services.

1 Like

Cool stuff, love me some chaotic GMod!

VERY good point, considering what happened to Apex Legends recently. I haven’t worked with bwrap before, but I took the day to add a basic bwrap environment to the run wrapper.