add srcds-tf2 to readme

This commit is contained in:
Robin Appelman 2026-07-08 01:37:56 +02:00
commit c20e0d8955

View file

@ -11,6 +11,32 @@ The following is currently packaged:
- `metamod-source` - `metamod-source`
- `sourcemod` - `sourcemod`
- [`sourcemod-include-library`](https://github.com/JoinedSenses/SourceMod-IncludeLibrary) - [`sourcemod-include-library`](https://github.com/JoinedSenses/SourceMod-IncludeLibrary)
- `srcds-tf2`
## TF2 Dedicated server
The `srcds-tf2` package contains the TF2 dedicated server.
You can start a basic server with
`nix run .#srcds-tf2 -- -enablefakeip +map cp_badlands`, once it's done loading
you can get the SDR ip using `status` (it will start with `169.254`), and
connect to it from your client.
### Writable tf directory
When running the server directly from the nix store, the tf directory will be
read only. Which is likely to cause issues as various things try to write to the
directory during normal operations. To work around this, you can either copy it
out of the nix store into a normal directory and make it writable, setup a
writable overlayfs, or try to configure tf2 to only write outside the tf
directory (unsure if this is feasible).
### Maps
To save space, `cp_badlands` is the only map bundled with `srcds-tf2`. If you
need additional maps you need to either manually add them to the server, or use
a plugin like [`mapdownloader`](https://codeberg.org/spire/mapdownloader) to
automatically download maps on demand;
## Sourcemod SDKs ## Sourcemod SDKs