dotfiles.nix/nixos/viridian/services/minecraft.nix
2024-01-21 21:00:06 +08:00

25 lines
560 B
Nix

{ pkgs, ... }:
{
# Sandbox game developed by Mojang Studios
services.minecraft-server = {
enable = true;
package = pkgs.unstable.minecraft-server;
openFirewall = true;
dataDir = "/var/lib/minecraft";
declarative = true;
serverProperties = {
gamemode = "survival";
level-name = "kanto.dev";
difficulty = "easy";
server-port = 25565;
motd = "Welcome to our little private place!";
};
eula = true;
};
environment.persistence."/persist" = {
directories = [ "/var/lib/minecraft" ];
};
}