diff --git a/minecraft/minecraft.nix b/minecraft/minecraft.nix index d25af79..1dd58e6 100644 --- a/minecraft/minecraft.nix +++ b/minecraft/minecraft.nix @@ -214,13 +214,19 @@ in { ''; }; - customJVMOpts = mkOpt' ( - with types; - coercedTo - (listOf str) - (lib.concatStringsSep " ") - (separatedString " ") - ) "" "Custom JVM options for this server."; + customJVMOpts = mkOption { + description = "Additional JVM options"; + type = types.coercedTo + types.str + (lib.splitString " ") + (types.listOf types.str); + default = [ ]; + example = [ + "-Dminecraft.api.env=custom" + "-Dminecraft.api.auth.host=https://mcauth.example.space/auth" + ]; + }; + operators = mkOption { type = types.attrsOf ( @@ -379,7 +385,7 @@ in { "-Xmx${serverCfg.memory.max}" "-Xms${serverCfg.memory.min}" ] - ++ lib.optional (serverCfg.customJVMOpts != "") serverCfg.customJVMOpts + ++ serverCfg.customJVMOpts ); autoStart = serverCfg.autoStart;