nix: change from pkgs.system to stdenv.hostPlatform.system
This commit is contained in:
parent
e5143c2000
commit
c57ec4fc2f
14 changed files with 241 additions and 129 deletions
25
modules/server/minecraft.nix
Normal file
25
modules/server/minecraft.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
flake.modules.nixos.minecraft-server =
|
||||
{ ... }:
|
||||
{
|
||||
services.minecraft-server = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
openFirewall = true; # Opens the port the server is running on (by default 25565 but in this case 43000)
|
||||
declarative = true;
|
||||
whitelist = {
|
||||
# This is a mapping from Minecraft usernames to UUIDs. You can use https://mcuuid.net/ to get a Minecraft UUID for a username
|
||||
Daholli = "9e206940-3dfc-4331-b781-b43a9905087a";
|
||||
};
|
||||
serverProperties = {
|
||||
server-port = 43000;
|
||||
difficulty = 3;
|
||||
gamemode = 1;
|
||||
max-players = 5;
|
||||
motd = "NixOS Minecraft server!";
|
||||
white-list = true;
|
||||
};
|
||||
jvmOpts = "-Xms2048M -Xmx4096M";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue