refactor(nixos): rely on SteamCMD app metadata

This commit is contained in:
2026-09-09 21:54:44 -04:00
parent 12e613fea4
commit 4f19d5987c
2 changed files with 0 additions and 10 deletions

View File

@@ -71,7 +71,6 @@
steamDir = "/pikachu/data/steamcmd";
serviceName = "valheim";
appId = 896660;
runtimeAppId = 892970;
installDir = "/pikachu/data/servers/valheim/main";
stateDir = "/pikachu/media/games/servers/valheim/main";
executable = "./valheim_server.x86_64";

View File

@@ -7,7 +7,6 @@
let
cfg = config.modules.services.steamcmd;
runtimeAppId = if cfg.runtimeAppId == null then cfg.appId else cfg.runtimeAppId;
libraryPath = lib.concatStringsSep ":" cfg.libraryDirs;
prepareScript = pkgs.writeShellScript "steamcmd-${cfg.serviceName}-prepare" ''
@@ -37,7 +36,6 @@ let
set -eu
cd ${lib.escapeShellArg cfg.installDir}
export SteamAppId=${lib.escapeShellArg (toString runtimeAppId)}
${lib.optionalString (cfg.libraryDirs != [ ]) ''export LD_LIBRARY_PATH=${lib.escapeShellArg libraryPath}:''${LD_LIBRARY_PATH-}''}
exec ${lib.getExe pkgs.steam-run} ${lib.escapeShellArg cfg.executable} ${lib.escapeShellArgs cfg.arguments}
'';
@@ -85,13 +83,6 @@ in
description = "Steam app ID for the dedicated server package.";
};
runtimeAppId = lib.mkOption {
type = lib.types.nullOr lib.types.ints.positive;
default = null;
example = 892970;
description = "Steam app ID exposed to the running server through SteamAppId. Defaults to appId.";
};
installDir = lib.mkOption {
type = lib.types.str;
example = "/data/servers/valheim/main";