dotfiles/modules/nixos/nas/guests/minecraft/default.nix

97 lines
2.7 KiB
Nix
Raw Normal View History

2025-12-08 03:32:04 -06:00
{ flake, pkgs, ... }:
let
inherit (import ./config { inherit flake pkgs; }) minecraftVM;
inherit (import ../../lib.generalHelpers) ipAddress;
inherit (import ../../lib.ceresHelpers) mntPath minecraft;
inherit (flake.config.people) user0;
id0 = builtins.toString minecraft.id0;
id1 = builtins.toString minecraft.id1;
id2 = builtins.toString minecraft.id2;
minecraftNick01 = minecraftVM {
user = user0;
ip = ipAddress id0;
mac = "02:00:00:00:${id0}:${id0}";
userMac = "02:00:00:00:00:${id0}";
ssh = minecraft.ssh0;
port = 43000;
mnt = mntPath user0;
worldNumber = "01";
config = {
allow-flight = false;
allow-nether = true;
difficulty = 2;
enable-command-block = false;
enable-rcon = true;
enable-status = true;
force-gamemode = true;
gamemode = 0;
generate-structures = true;
hardcore = false;
hide-online-players = false;
level-name = "Brix on Nix";
level-seed = "9064150133272194";
max-players = 10;
max-world-size = 64000000;
motd = "A cool Minecraft server powered by NixOS";
online-mode = true;
pvp = true;
spawn-animals = true;
spawn-monsters = true;
spawn-npcs = true;
spawn-protection = 16;
view-distance = 32;
white-list = true;
};
whitelist = {
Hefty_Chungus = "b75a9816-d408-4c54-b226-385b59ea1cb3";
Hefty_Chungus_Jr = "c3bf8cac-e953-4ea4-ae5f-7acb92a51a85";
EclipseMoon01 = "adef4af7-d8c6-4627-b492-e990ea1bb993";
Fallaryn = "d8baa117-ab58-4b07-92a5-48fb1978eb49";
};
};
minecraftNick02 = minecraftVM {
user = user0;
ip = ipAddress id1;
mac = "02:00:00:00:${id1}:${id1}";
userMac = "02:00:00:00:00:${id1}";
ssh = minecraft.ssh1;
port = 43001;
mnt = mntPath user0;
worldNumber = "02";
config = {
allow-flight = false;
allow-nether = true;
difficulty = 2;
enable-command-block = false;
enable-rcon = true;
enable-status = true;
force-gamemode = true;
gamemode = 0;
generate-structures = true;
hardcore = false;
hide-online-players = false;
level-name = "Cuddle Cubes";
level-seed = "-2332803749585407299";
max-players = 10;
max-world-size = 64000000;
motd = "A cool Minecraft server powered by NixOS";
online-mode = true;
pvp = true;
spawn-animals = true;
spawn-monsters = true;
spawn-npcs = true;
spawn-protection = 16;
view-distance = 32;
white-list = true;
};
whitelist = {
Hefty_Chungus = "b75a9816-d408-4c54-b226-385b59ea1cb3";
Fallaryn = "d8baa117-ab58-4b07-92a5-48fb1978eb49";
};
};
in
minecraftNick01 // minecraftNick02