disabled nextcloud and gitea

fixed minecraft service not stopping
This commit is contained in:
Gerg-L 2023-04-09 18:57:31 -04:00
parent 663812dd1f
commit ae070d84f9
2 changed files with 2 additions and 12 deletions

View file

@ -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";