From 54a362965b20c1f57eb3d2d4013530fee8ab2fde Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 2 Oct 2022 18:19:54 +0200 Subject: [PATCH] VEGAS/minecraft: add instance 0fyy6ksf --- .../services/minecraft/customer-0fyy6ksf.nix | 30 +++++++++++++++++++ hosts/VEGAS/services/minecraft/default.nix | 1 + 2 files changed, 31 insertions(+) create mode 100644 hosts/VEGAS/services/minecraft/customer-0fyy6ksf.nix diff --git a/hosts/VEGAS/services/minecraft/customer-0fyy6ksf.nix b/hosts/VEGAS/services/minecraft/customer-0fyy6ksf.nix new file mode 100644 index 0000000..c857478 --- /dev/null +++ b/hosts/VEGAS/services/minecraft/customer-0fyy6ksf.nix @@ -0,0 +1,30 @@ +{ config, inputs, pkgs, ... }: +let + custId = "0fyy6ksf"; +in +{ + links."mc-${custId}" = {}; + links."mc-rcon-${custId}" = {}; + services.modded-minecraft-servers.instances."${custId}" = { + enable = true; + rsyncSSHKeys = [ + "ssh-ed25519 dummyKey" + ]; + jvmPackage = inputs.self.packages.${pkgs.system}.jre17_standard; + jvmInitialAllocation = "2G"; + jvmMaxAllocation = "4G"; + serverConfig = { + server-port = config.links."mc-${custId}".port; + motd = "Hosted by Private Void"; + enable-rcon = true; + rcon-port = config.links."mc-rcon-${custId}".port; + rcon-password = "manager"; + }; + }; + systemd.services."mc-${custId}".serviceConfig = { + CPUQuota = "200%"; + MemoryHigh = "4.2G"; + MemoryMax = "4.3G"; + MemorySwapMax = "1G"; + }; +} diff --git a/hosts/VEGAS/services/minecraft/default.nix b/hosts/VEGAS/services/minecraft/default.nix index 7ddaf75..eececcc 100644 --- a/hosts/VEGAS/services/minecraft/default.nix +++ b/hosts/VEGAS/services/minecraft/default.nix @@ -2,5 +2,6 @@ services.modded-minecraft-servers.eula = true; imports = [ ./num.nix + ./customer-0fyy6ksf.nix ]; }