Update game-servers.nix
This commit is contained in:
parent
3c2febaa25
commit
65cd7b3c2a
1 changed files with 26 additions and 1 deletions
|
|
@ -2,6 +2,31 @@
|
||||||
{
|
{
|
||||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||||
## <----- HYTALE ----> ##
|
## <----- HYTALE ----> ##
|
||||||
#
|
systemd.services.hytale-server = {
|
||||||
|
description = "Hytale Dedicated Server";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
HYTALE_MEMORY = "8G"; # Adjust memory allocation here
|
||||||
|
};
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
User = "fred";
|
||||||
|
Group = "users";
|
||||||
|
WorkingDirectory = "/home/fred/docker/hytale-server/Server";
|
||||||
|
ExecStart = "/home/fred/docker/hytale-server/start-hytale.sh";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "10s";
|
||||||
|
TimeoutStopSec = "30s";
|
||||||
|
|
||||||
|
# Security hardening
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
PrivateTmp = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [ 5520 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue