add palworld
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
./modules/netdata.nix
|
||||
./modules/step-ca.nix
|
||||
./modules/tmpfs.nix
|
||||
./modules/games/palworld.nix
|
||||
./modules/logging.nix
|
||||
### Hardware ###
|
||||
./modules/hardware/ssd.nix
|
||||
|
||||
45
modules/games/palworld.nix
Normal file
45
modules/games/palworld.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
# valheim.nix
|
||||
{config, pkgs, lib, ...}: let
|
||||
in {
|
||||
|
||||
networking.firewall.allowedUDPPorts = [ 8221 ]; #5349 ];
|
||||
users.users.palworld = {
|
||||
isSystemUser = true;
|
||||
# Valheim puts save data in the home directory.
|
||||
home = "/var/lib/palworld";
|
||||
createHome = true;
|
||||
homeMode = "750";
|
||||
group = "palworld";
|
||||
};
|
||||
|
||||
users.groups.palworld = {};
|
||||
|
||||
systemd.services.palworld = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
|
||||
preStart = ''
|
||||
${pkgs.steamcmd}/bin/steamcmd \
|
||||
+login anonymous \
|
||||
+force_install_dir /var/lib/palworld \
|
||||
+app_update 2394010 validate \
|
||||
+quit
|
||||
'';
|
||||
script = "${pkgs.steam-run}/bin/steam-run /var/lib/palworld/Pal/Binaries/Linux/PalServer-Linux-Test";
|
||||
|
||||
serviceConfig = {
|
||||
Nice = "-5";
|
||||
PrivateTmp = true;
|
||||
Restart = "always";
|
||||
User = "palworld";
|
||||
WorkingDirectory = "~";
|
||||
};
|
||||
environment = {
|
||||
# linux64 directory is required by Valheim.
|
||||
LD_LIBRARY_PATH = "/var/lib/palworld/linux64:${pkgs.glibc}/lib";
|
||||
SteamAppId = "2394010";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user