fix(nixos): avoid blocking guest startup on steamcmd

This commit is contained in:
2026-09-12 19:55:43 -04:00
parent cd220b8030
commit 3a3bdfad16
2 changed files with 21 additions and 0 deletions

View File

@@ -65,6 +65,13 @@
default = [ ];
description = "TCP ports opened for the game service.";
};
startupTimeout = lib.mkOption {
type = lib.types.str;
default = "15min";
example = "30min";
description = "Time systemd allows SteamCMD update and server startup to complete.";
};
};
config = lib.mkMerge [
@@ -138,12 +145,14 @@
WorkingDirectory = "-${service.steamDir}";
ExecStartPre = "+${prepareScript}";
ExecStart = updateScript;
TimeoutStartSec = service.startupTimeout;
};
};
${service.serviceName} = {
description = "${service.serviceName} game server";
after = [
"multi-user.target"
"network-online.target"
"steamcmd-${service.serviceName}-update.service"
];
@@ -160,6 +169,7 @@
];
ExecStart = startScript;
Restart = "on-failure";
TimeoutStartSec = service.startupTimeout;
};
};
};