1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

nixos/servnerr-3: enable Minecraft

Signed-off-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
Matt Layher 2021-10-29 00:21:05 -04:00
parent 60bb15b54c
commit 57dbe41037
No known key found for this signature in database
GPG key ID: 77BFE531397EDE94
2 changed files with 50 additions and 0 deletions

View file

@ -44,6 +44,7 @@ in {
lm_sensors
lshw
lsscsi
magic-wormhole
minicom
mkpasswd
mtr

View file

@ -4,6 +4,55 @@
# These services are proprietary and run containerized for confinement from
# the rest of the system and on unstable for faster update cycles.
containers = {
minecraft = {
autoStart = true;
bindMounts = {
# Mount the data directory as read/write.
"/var/lib/minecraft" = {
hostPath = "/var/lib/minecraft";
isReadOnly = false;
};
};
config = { ... }:
let
secrets = import ./lib/secrets.nix;
unstable =
import <nixos-unstable-small> { config.allowUnfree = true; };
in {
services.minecraft-server = {
enable = true;
package = unstable.minecraft-server;
eula = true;
declarative = true;
# Use more RAM!
jvmOpts = "-Xmx16384M -Xms16384M";
serverProperties = {
motd = "Matt's Minecraft server";
enable-rcon = true;
"rcon.password" = secrets.minecraft.rcon;
pvp = false;
view-distance = 15;
enforce-whitelist = true;
white-list = true;
};
whitelist = {
blalex93 = "b0d98aa2-8284-4830-b06e-a205ee0f166b";
DocNastyDub = "d849719b-2438-4ecc-8557-7decc63ad5cb";
ericthegreat12 = "6853f664-f600-42c5-9d82-934d0ab6df9c";
HashtagVEGAS = "2dfdd3a5-876b-4042-b2bf-5a49621e998f";
nerrster = "38f8c307-dde4-4774-a969-f4cc69dec50e";
rothberry = "5d758298-b38b-4e30-8e02-161373b26c01";
Son_of_a_Teacher = "42cc4da3-3d2a-4cc3-9b2d-897f93438594";
TheWrat = "dcc01480-e7d9-4f1d-9eb2-87ebb1e6af74";
};
};
};
};
plex = {
autoStart = true;
bindMounts = {