Update game-servers.nix
This commit is contained in:
parent
b63c7f8a2a
commit
75eecd3381
1 changed files with 28 additions and 26 deletions
|
|
@ -1,30 +1,32 @@
|
|||
#/services/game-servers.nix
|
||||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||
## <----- HYTALE ----> ##
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers."hytale" = {
|
||||
image = "ghcr.io/indifferentbroccoli/hytale-server-docker: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:/home/hytale/server-files"
|
||||
];
|
||||
extraOptions = [
|
||||
"--interactive=false"
|
||||
"--tty=false"
|
||||
];
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedUDPPorts = [ 5520 ];
|
||||
};
|
||||
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
|
||||
## <----- HYTALE ----> ##
|
||||
virtualisation.oci-containers = {
|
||||
backend = "docker";
|
||||
containers."hytale" = {
|
||||
image = "indifferentbroccoli/hytale-server-docker:latest";
|
||||
autoStart = true;
|
||||
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:/home/hytale/server-files"
|
||||
];
|
||||
extraOptions = [
|
||||
"--stop-timeout=30"
|
||||
"--interactive"
|
||||
"--tty"
|
||||
];
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedUDPPorts = [ 5520 ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue