Update game-servers.nix

This commit is contained in:
ediblerope 2026-01-25 16:19:42 +00:00 committed by GitHub
parent 3c2febaa25
commit 65cd7b3c2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,31 @@
{
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
## <----- 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 ];
};
}