-
Notifications
You must be signed in to change notification settings - Fork 15
/
stationeers.nix
30 lines (29 loc) · 1.02 KB
/
stationeers.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ pkgs, ... }:
{
config = {
networking.firewall.allowedUDPPorts = [ 27016 ];
networking.firewall.allowedTCPPorts = [ 8000 ];
systemd.services.stationeers = {
#wantedBy = [ "multi-user.target" ];
path = [ pkgs.steamcmd pkgs.steam-run ];
serviceConfig = {
User = "stationeers";
WorkingDirectory = "/var/lib/stationeers";
TimeoutStartSec = "5m";
};
preStart = ''
steamcmd +force_install_dir /var/lib/stationeers +login anonymous +app_update 600760 -beta beta validate +quit
'';
script = ''
steam-run /var/lib/stationeers/rocketstation_DedicatedServer.x86_64 -loadlatest 2022-mars mars -settings StartLocalHost true ServerPassword password ServerMaxPlayers 5 UPNPEnabled false SaveInterval 60 SunOrbitPeriod 2 AutoPauseServer false
'';
};
users.users.stationeers = {
isSystemUser = true;
createHome = true;
home = "/var/lib/stationeers";
group = "stationeers";
};
users.groups.stationeers = {};
};
}