use proxy instead of hosting on hetzner

This commit is contained in:
Gerg-L 2024-08-18 00:20:27 -04:00
parent 3b5678a9ca
commit 579c635521
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
6 changed files with 68 additions and 116 deletions

View file

@ -52,6 +52,7 @@ func () {
func "*.gerg-l.com" "8f76f071c5edbc0f947a5c5f9c5df9f8"
func "gerg-l.com" "8f76f071c5edbc0f947a5c5f9c5df9f8" "false"
func "ipv6.gerg-l.com" "8f76f071c5edbc0f947a5c5f9c5df9f8" "false"
func "*.nix-fu.com" "cc2df9163c3730f58b866409ac5a108c"
func "nix-fu.com" "cc2df9163c3730f58b866409ac5a108c"

View file

@ -1,15 +1,16 @@
{ lib, self' }:
{
# I manually switch this sometimes
config = lib.mkIf false {
config = lib.mkIf true {
networking.firewall.allowedTCPPorts = [
25565
25575
24454
];
users = {
users.minecraft = {
home = "/minecraft";
home = "/persist/minecraft2";
createHome = true;
isSystemUser = true;
group = "minecraft";
@ -22,34 +23,35 @@
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
script = ''
${lib.getExe self'.packages.papermc} \
-Xms6G \
-Xmx6G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 \
-XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 \
-XX:G1HeapWastePercent=5 \
-XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 \
-XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseTimePercent=5 \
-XX:SurvivorRatio=32 \
-XX:+PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 \
-Dusing.aikars.flags=https://mcflags.emc.gs-Daikars.new.flags=true \
${lib.getExe self'.packages.fabric} \
-Xms12G \
-Xmx12G \
-XX:+UnlockExperimentalVMOptions \
-XX:+UnlockDiagnosticVMOptions \
-XX:+AlwaysActAsServerClassMachine \
-XX:+AlwaysPreTouch \
-XX:+DisableExplicitGC \
-XX:+UseNUMA \
-XX:NmethodSweepActivity=1 \
-XX:ReservedCodeCacheSize=400M \
-XX:NonNMethodCodeHeapSize=12M \
-XX:ProfiledCodeHeapSize=194M \
-XX:NonProfiledCodeHeapSize=194M \
-XX:-DontCompileHugeMethods \
-XX:MaxNodeLimit=240000 \
-XX:NodeLimitFudgeFactor=8000 \
-XX:+UseVectorCmov \
-XX:+PerfDisableSharedMem \
-XX:+UseFastUnorderedTimeStamps \
-XX:+UseCriticalJavaThreadPriority \
-XX:ThreadPriorityPolicy=1 \
-XX:AllocatePrefetchStyle=3
'';
serviceConfig = {
Restart = "always";
User = "minecraft";
WorkingDirectory = "/minecraft";
WorkingDirectory = "/persist/minecraft2";
StandardInput = "journal";
StandardOutput = "journal";