diff options
author | sefidel <contact@sefidel.net> | 2024-12-09 01:38:45 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-12-22 13:21:38 +0900 |
commit | 53ef9143a6261ec77dcb576b62187801a8fc895b (patch) | |
tree | ab33d1e92bd74847ff497f8913205429f3e073e0 /modules/services | |
parent | cb86a914cdacc8dc3519087fa7ecb8c62d07fd6a (diff) | |
download | nixrc-53ef9143a6261ec77dcb576b62187801a8fc895b.tar.gz nixrc-53ef9143a6261ec77dcb576b62187801a8fc895b.zip |
feat(modules/minecraft-server)!: remove module
Diffstat (limited to 'modules/services')
-rw-r--r-- | modules/services/minecraft-server.nix | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/modules/services/minecraft-server.nix b/modules/services/minecraft-server.nix deleted file mode 100644 index 072c934..0000000 --- a/modules/services/minecraft-server.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.services.minecraft-server; -in -{ - options.modules.services.minecraft-server = { - enable = mkEnableOption ""; - package = mkOption { type = types.package; default = pkgs.papermc; }; - openFirewall = mkOption { - type = types.bool; - default = false; - }; - bedrockSupport = mkOption { - type = types.bool; - default = false; - }; - eula = mkOption { - type = types.bool; - default = false; - }; - dataDir = mkOption { - type = types.str; - default = "/var/lib/minecraft"; - }; - }; - - config = mkIf cfg.enable { - services.minecraft-server = { - enable = true; - package = cfg.package; - declarative = false; - eula = cfg.eula; - dataDir = cfg.dataDir; - jvmOpts = "-Xms4096M -Xmx4096M" - + " -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled" - + " -XX:+UnlockExperimentalVMOptions" - + " -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5" - + " -XX:G1MaxNewSizePercent=40 -XX:G1NewSizePercent=30" - + " -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90" - + " -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20" - + " -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200" - + " -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32"; - }; - - modules.persistence.directories = [ - cfg.dataDir - ]; - - networking.firewall.allowedTCPPorts = [ 25565 ] - ++ optionals (cfg.bedrockSupport) [ 19132 ]; - networking.firewall.allowedUDPPorts = [ 25565 ] - ++ optionals (cfg.bedrockSupport) [ 19132 ]; - }; -} |