From ae070d84f9ad59bea0280e83edb77d5dd16f0bc6 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sun, 9 Apr 2023 18:57:31 -0400 Subject: [PATCH] disabled nextcloud and gitea fixed minecraft service not stopping --- systems/gerg-desktop/containers/default.nix | 2 +- systems/gerg-desktop/containers/minecraft.nix | 12 +----------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/systems/gerg-desktop/containers/default.nix b/systems/gerg-desktop/containers/default.nix index fb9d786..c4ee699 100644 --- a/systems/gerg-desktop/containers/default.nix +++ b/systems/gerg-desktop/containers/default.nix @@ -1,6 +1,6 @@ inputs: { imports = [ (import ./minecraft.nix inputs) - (import ./website.nix inputs) + # (import ./website.nix inputs) ]; } diff --git a/systems/gerg-desktop/containers/minecraft.nix b/systems/gerg-desktop/containers/minecraft.nix index a1362d2..1b41041 100644 --- a/systems/gerg-desktop/containers/minecraft.nix +++ b/systems/gerg-desktop/containers/minecraft.nix @@ -10,16 +10,7 @@ _: {...}: { hostPath = "/persist/minecraft"; isReadOnly = false; }; - config = {pkgs, ...}: let - stopScript = pkgs.writeShellScript "minecraft-server-stop" '' - echo stop > /run/minecraft-server.stdin - # Wait for the PID of the minecraft server to disappear before - # returning, so systemd doesn't attempt to SIGKILL it. - while kill -0 "$1" 2> /dev/null; do - sleep 1s - done - ''; - in { + config = {pkgs, ...}: { nixpkgs.config.allowUnfree = true; environment.systemPackages = [pkgs.neovim]; networking = { @@ -70,7 +61,6 @@ _: {...}: { serviceConfig = { ExecStart = "${pkgs.papermc}/bin/minecraft-server -Xms8G -Xmx8G -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"; - ExecStop = "${stopScript} $MAINPID"; Restart = "always"; User = "minecraft"; WorkingDirectory = "/minecraft";