mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
disabled nextcloud and gitea
fixed minecraft service not stopping
This commit is contained in:
parent
663812dd1f
commit
ae070d84f9
2 changed files with 2 additions and 12 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
inputs: {
|
inputs: {
|
||||||
imports = [
|
imports = [
|
||||||
(import ./minecraft.nix inputs)
|
(import ./minecraft.nix inputs)
|
||||||
(import ./website.nix inputs)
|
# (import ./website.nix inputs)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,7 @@ _: {...}: {
|
||||||
hostPath = "/persist/minecraft";
|
hostPath = "/persist/minecraft";
|
||||||
isReadOnly = false;
|
isReadOnly = false;
|
||||||
};
|
};
|
||||||
config = {pkgs, ...}: let
|
config = {pkgs, ...}: {
|
||||||
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 {
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
environment.systemPackages = [pkgs.neovim];
|
environment.systemPackages = [pkgs.neovim];
|
||||||
networking = {
|
networking = {
|
||||||
|
|
@ -70,7 +61,6 @@ _: {...}: {
|
||||||
|
|
||||||
serviceConfig = {
|
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";
|
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";
|
Restart = "always";
|
||||||
User = "minecraft";
|
User = "minecraft";
|
||||||
WorkingDirectory = "/minecraft";
|
WorkingDirectory = "/minecraft";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue