Update game-servers.nix

This commit is contained in:
ediblerope 2026-01-25 16:38:45 +00:00 committed by GitHub
parent 45d447d2d0
commit b42f6ecbae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,18 +7,20 @@
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
path = with pkgs; [ bash jdk unzip gawk gnugrep coreutils ]; # Add required tools
path = with pkgs; [ bash jdk unzip gawk gnugrep coreutils screen ]; # Added screen
environment = {
HYTALE_MEMORY = "8G"; # Adjust memory allocation here
HYTALE_MEMORY = "8G";
};
serviceConfig = {
Type = "simple";
Type = "forking"; # Changed from "simple"
User = "fred";
Group = "users";
WorkingDirectory = "/home/fred/docker/hytale-server/Server";
ExecStart = "/home/fred/docker/hytale-server/start-hytale.sh";
ExecStart = "${pkgs.screen}/bin/screen -dmS hytale /home/fred/docker/hytale-server/start-hytale.sh";
ExecStop = "${pkgs.screen}/bin/screen -S hytale -X stuff 'stop^M'";
RemainAfterExit = "yes";
Restart = "on-failure";
RestartSec = "10s";
TimeoutStopSec = "30s";