feat: adding the minecraft server configuration
This commit is contained in:
parent
f4628c0b47
commit
f19eca3df6
7 changed files with 116 additions and 3 deletions
37
services/games/minecraft.nix
Normal file
37
services/games/minecraft.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
cfg = config.service.minecraft.enium-pv;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.minecraft.nixosModules.minecraft-servers
|
||||
];
|
||||
|
||||
|
||||
config = lib.mkIf cfg {
|
||||
nixpkgs.overlays = [
|
||||
inputs.minecraft.overlay
|
||||
];
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
|
||||
servers.enium-pv = {
|
||||
enable = true;
|
||||
package = pkgs.fabricServers.fabric-1_20_1;
|
||||
jvmOpts = "-Xms4092M -Xmx4092M";
|
||||
serverProperties = {
|
||||
difficulty = 3;
|
||||
gamemode = 0;
|
||||
max-players = 42;
|
||||
motd = "§l §3 Enium Survival§r\n§l §b Whitelisted Server";
|
||||
server-port = 64421;
|
||||
spawn-protection=16;
|
||||
white-list = true;
|
||||
};
|
||||
restart = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue