defiant: Add 'home' minecraft server
This commit is contained in:
parent
66725eae8c
commit
2894eaf108
@ -26,7 +26,7 @@
|
|||||||
./services/koillection.nix
|
./services/koillection.nix
|
||||||
./services/matrix
|
./services/matrix
|
||||||
./services/microbin.nix
|
./services/microbin.nix
|
||||||
# ./services/minecraft.nix
|
./services/minecraft/home.nix
|
||||||
./services/monitoring
|
./services/monitoring
|
||||||
./services/rtl-tcp.nix
|
./services/rtl-tcp.nix
|
||||||
./services/searx.nix
|
./services/searx.nix
|
||||||
|
49
hosts/defiant/services/minecraft/home.nix
Normal file
49
hosts/defiant/services/minecraft/home.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ config, pkgs, lib, inputs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
|
||||||
|
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
|
||||||
|
|
||||||
|
services.minecraft-servers = {
|
||||||
|
enable = true;
|
||||||
|
eula = true;
|
||||||
|
openFirewall = true;
|
||||||
|
dataDir = "/var/lib/minecraft-server";
|
||||||
|
|
||||||
|
servers.home = {
|
||||||
|
enable = true;
|
||||||
|
jvmOpts = "-Xms4G -Xmx4G";
|
||||||
|
|
||||||
|
package = pkgs.fabricServers.fabric-1_21_4;
|
||||||
|
|
||||||
|
serverProperties = {
|
||||||
|
motd = "Home <3";
|
||||||
|
difficulty = "easy";
|
||||||
|
view-distance = 16;
|
||||||
|
simulation-distance = 16;
|
||||||
|
enable-command-block = true;
|
||||||
|
enable-rcon = true;
|
||||||
|
"rcon.password" = "wack";
|
||||||
|
};
|
||||||
|
|
||||||
|
symlinks = {
|
||||||
|
mods = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues {
|
||||||
|
FabricAPI = pkgs.fetchurl {
|
||||||
|
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/8FAH9fuR/fabric-api-0.114.2%2B1.21.4.jar";
|
||||||
|
sha256 = "sha256-nL1bcAaMW0tRCpfW0prd3mce14ZNcl7pAUabVXAQfWs=";
|
||||||
|
};
|
||||||
|
Lithium = pkgs.fetchurl {
|
||||||
|
url = "https://cdn.modrinth.com/data/gvQqBUqZ/versions/zVOQw7YU/lithium-fabric-0.14.6%2Bmc1.21.4.jar";
|
||||||
|
sha256 = "sha256-iF4hy+3XVJP7Fv6R2dsrYq6Ct0MQJLX4/4Yh5WEJm90=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||||
|
"minecraft-server"
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall.allowedUDPPorts = [ 24454 ];
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user