From 655513398424efb1873112885e274396f4dfa971 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 25 Mar 2022 21:32:30 +0100 Subject: [PATCH] VEGAS/minecraft: add instance for num --- hosts/VEGAS/services/minecraft/default.nix | 6 ++++++ hosts/VEGAS/services/minecraft/num.nix | 17 +++++++++++++++++ hosts/VEGAS/system.nix | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 hosts/VEGAS/services/minecraft/default.nix create mode 100644 hosts/VEGAS/services/minecraft/num.nix diff --git a/hosts/VEGAS/services/minecraft/default.nix b/hosts/VEGAS/services/minecraft/default.nix new file mode 100644 index 0000000..7ddaf75 --- /dev/null +++ b/hosts/VEGAS/services/minecraft/default.nix @@ -0,0 +1,6 @@ +{ + services.modded-minecraft-servers.eula = true; + imports = [ + ./num.nix + ]; +} diff --git a/hosts/VEGAS/services/minecraft/num.nix b/hosts/VEGAS/services/minecraft/num.nix new file mode 100644 index 0000000..b5dbd24 --- /dev/null +++ b/hosts/VEGAS/services/minecraft/num.nix @@ -0,0 +1,17 @@ +{ config, pkgs, ... }: +{ + reservePortsFor = [ "mc-num" ]; + services.modded-minecraft-servers.instances.num = { + enable = true; + rsyncSSHKeys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL5C7mC5S2gM0K6x0L/jNwAeQYbFSzs16Q73lONUlIkL" # max@TITAN + ]; + jvmPackage = pkgs.jdk17; + jvmInitialAllocation = "2G"; + jvmMaxAllocation = "8G"; + serverConfig = { + server-port = config.ports.mc-num; + motd = "Welcome to num's minecraft server"; + }; + }; +} diff --git a/hosts/VEGAS/system.nix b/hosts/VEGAS/system.nix index c4c3af9..9fea86f 100644 --- a/hosts/VEGAS/system.nix +++ b/hosts/VEGAS/system.nix @@ -13,6 +13,7 @@ ./modules/redis ./modules/virtualisation inputs.agenix.nixosModules.age + inputs.mms.module # Services ./services/api @@ -29,6 +30,7 @@ ./services/nfs ./services/mail ./services/matrix + ./services/minecraft ./services/nix/binary-cache.nix ./services/nix/nar-serve.nix ./services/object-storage