mod: exposed some more options
This commit is contained in:
3 files changed
+57
-5
No files matched your search
@@ -56,18 +56,51 @@ recreated on each start and removed on stop by nix-minecraft. Edits to those
|
||||
copies do not persist across restarts. World data is not part of those managed
|
||||
directories.
|
||||
|
||||
Change the Minecraft port in `modules/machine/krile/configuration.nix`:
|
||||
|
||||
```nix
|
||||
services.homestead.port = 25566;
|
||||
```
|
||||
|
||||
The default is TCP 25565. When `services.homestead.openFirewall = true`, the
|
||||
opened TCP port follows this setting. Update your router's port forwarding and
|
||||
connect with `krile:25566` (or your server's address). Voice chat remains on
|
||||
UDP 24454, matching the pack's `config/voicechat/voicechat-server.properties`.
|
||||
Rebuild krile to apply the change.
|
||||
|
||||
Change memory in the host configuration:
|
||||
|
||||
```nix
|
||||
services.homestead.jvmOpts = "-Xms6G -Xmx12G -XX:+UseG1GC";
|
||||
```
|
||||
|
||||
Declare operators in the host configuration:
|
||||
|
||||
```nix
|
||||
services.homestead.operators = {
|
||||
"YourMinecraftName" = {
|
||||
uuid = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
||||
level = 4;
|
||||
bypassesPlayerLimit = false;
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
Replace the example name and UUID with the player's actual Minecraft account
|
||||
details. A UUID string also works as a shorthand:
|
||||
`services.homestead.operators."YourMinecraftName" = "your-player-uuid";`.
|
||||
It defaults to permission level 4 and does not bypass the player limit.
|
||||
|
||||
After rebuilding krile, nix-minecraft generates
|
||||
`/srv/minecraft/homestead/ops.json` when the server starts. A nonempty operator
|
||||
list replaces the file on each start, so changes made with `/op` or `/deop` do
|
||||
not persist across restarts. The default `{ }` leaves `ops.json` unmanaged.
|
||||
|
||||
Other server settings use the underlying nix-minecraft options:
|
||||
|
||||
```nix
|
||||
services.minecraft-servers.servers.homestead = {
|
||||
serverProperties = {
|
||||
server-port = 25566;
|
||||
max-players = 10;
|
||||
white-list = true;
|
||||
};
|
||||
@@ -76,8 +109,8 @@ services.minecraft-servers.servers.homestead = {
|
||||
};
|
||||
```
|
||||
|
||||
Changing `server-port` also changes the opened TCP port. Voice chat remains on
|
||||
UDP 24454, matching the pack's `config/voicechat/voicechat-server.properties`.
|
||||
The underlying `serverProperties.server-port` setting can still override
|
||||
`services.homestead.port`; the opened TCP port follows the effective value.
|
||||
|
||||
To use this module on another NixOS host, pass `nur` in `specialArgs`, import
|
||||
`modules/games/homestead`, set `services.homestead.enable = true`, and set
|
||||
|
||||
Reference in new issue
Block a user