Add modded minecraft server
This commit is contained in:
parent
ea91b61a39
commit
9e5eab7824
|
@ -4,7 +4,7 @@ Using [colmena](https://github.com/zhaofengli/colmena)
|
||||||
## Hosts
|
## Hosts
|
||||||
- `bloodletting`: Main server
|
- `bloodletting`: Main server
|
||||||
|
|
||||||
## Manual setup on blank system/migrations
|
### Manual setup on blank system/migrations
|
||||||
- `colmena apply` - deploy config
|
- `colmena apply` - deploy config
|
||||||
- `passwd` - set user passwords
|
- `passwd` - set user passwords
|
||||||
- rsync state:
|
- rsync state:
|
||||||
|
@ -21,6 +21,9 @@ Using [colmena](https://github.com/zhaofengli/colmena)
|
||||||
- `prometheus2`
|
- `prometheus2`
|
||||||
- `/home/ftp`
|
- `/home/ftp`
|
||||||
|
|
||||||
|
### Rsyncd Modules
|
||||||
|
Modded minecraft instance rsync modules can be accessed through `mc-[modpack]@bloodletting::mc-[modpack]` with `--rsh=ssh`
|
||||||
|
|
||||||
## Reference configs used
|
## Reference configs used
|
||||||
- https://github.com/Xe/nixos-configs
|
- https://github.com/Xe/nixos-configs
|
||||||
- https://git.nora.codes/nora/nixconfig
|
- https://git.nora.codes/nora/nixconfig
|
|
@ -0,0 +1,61 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
let
|
||||||
|
rsyncSSHKeys = config.users.users.agatha.openssh.authorizedKeys.keys
|
||||||
|
++ config.users.users.julia.openssh.authorizedKeys.keys;
|
||||||
|
|
||||||
|
jre8 = pkgs.temurin-bin-8;
|
||||||
|
jre17 = pkgs.temurin-bin-17;
|
||||||
|
|
||||||
|
jvmOpts = lib.concatStringsSep " " [
|
||||||
|
"-XX:+UseG1GC"
|
||||||
|
"-XX:+ParallelRefProcEnabled"
|
||||||
|
"-XX:MaxGCPauseMillis=200"
|
||||||
|
"-XX:+UnlockExperimentalVMOptions"
|
||||||
|
"-XX:+DisableExplicitGC"
|
||||||
|
"-XX:+AlwaysPreTouch"
|
||||||
|
"-XX:G1NewSizePercent=40"
|
||||||
|
"-XX:G1MaxNewSizePercent=50"
|
||||||
|
"-XX:G1HeapRegionSize=16M"
|
||||||
|
"-XX:G1ReservePercent=15"
|
||||||
|
"-XX:G1HeapWastePercent=5"
|
||||||
|
"-XX:G1MixedGCCountTarget=4"
|
||||||
|
"-XX:InitiatingHeapOccupancyPercent=20"
|
||||||
|
"-XX:G1MixedGCLiveThresholdPercent=90"
|
||||||
|
"-XX:G1RSetUpdatingPauseTimePercent=5"
|
||||||
|
"-XX:SurvivorRatio=32"
|
||||||
|
"-XX:+PerfDisableSharedMem"
|
||||||
|
"-XX:MaxTenuringThreshold=1"
|
||||||
|
];
|
||||||
|
|
||||||
|
serverDefaults = {
|
||||||
|
white-list = true;
|
||||||
|
spawn-protection = 0;
|
||||||
|
allow-flight = true;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services.modded-minecraft-servers = {
|
||||||
|
eula = true;
|
||||||
|
|
||||||
|
instances = {
|
||||||
|
# End to End encrypted modded minecraft yay
|
||||||
|
e2e = {
|
||||||
|
enable = true;
|
||||||
|
inherit rsyncSSHKeys jvmOpts;
|
||||||
|
|
||||||
|
jvmMaxAllocation = "8G";
|
||||||
|
jvmPackage = jre8;
|
||||||
|
|
||||||
|
serverConfig = serverDefaults // {
|
||||||
|
server-port = 25565;
|
||||||
|
rcon-port = 25566;
|
||||||
|
motd = "Enigmeowtica 2: Expert";
|
||||||
|
extra-options.level-type = "BIOMESOP";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.mc-e2e.path = with pkgs; [ getconf gawk ];
|
||||||
|
|
||||||
|
users.users.agatha.packages = with pkgs; [ mcrcon ];
|
||||||
|
}
|
Loading…
Reference in New Issue