Update game-servers.nix

This commit is contained in:
ediblerope 2026-01-20 21:06:31 +00:00 committed by GitHub
parent f6dd495ad3
commit 83666e7e7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,28 +1,29 @@
{ config, pkgs, lib, ... }:
{
## <----- HYTALE ----> ##
virtualisation.oci-containers = {
backend = "docker";
containers."hytale-server" = {
image = "ghcr.io/terkea/hytale-server:latest";
ports = [ "5520:5520/udp" ];
environment = {
SERVER_NAME = "Nordhammer.it Hytale Server";
MAX_PLAYERS = "50";
MEMORY = "4G";
ENABLE_BACKUP = "true";
BACKUP_FREQUENCY = "30";
PASSWORD = "DukeSmells";
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
## <----- HYTALE ----> ##
virtualisation.oci-containers = {
backend = "docker";
containers."hytale-server" = {
image = "ghcr.io/terkea/hytale-server:latest";
ports = [ "5520:5520/udp" ];
environment = {
SERVER_NAME = "Nordhammer.it Hytale Server";
MAX_PLAYERS = "50";
MEMORY = "4G";
ENABLE_BACKUP = "true";
BACKUP_FREQUENCY = "30";
PASSWORD = "DukeSmells";
};
volumes = [
"/home/fred/docker/hytale-server/hytale-data:/data"
];
extraOptions = [
"--interactive=false"
"--tty=false"
];
};
volumes = [
"/home/fred/docker/hytale-server/hytale-data:/data"
];
extraOptions = [
"--interactive=false"
"--tty=false"
];
};
networking.firewall.allowedUDPPorts = [ 5520 ];
};
networking.firewall.allowedUDPPorts = [ 5520 ];
}