fix: custom jvm options
This commit is contained in:
parent
847bad4280
commit
d594544229
1 changed files with 14 additions and 8 deletions
|
|
@ -214,13 +214,19 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
customJVMOpts = mkOpt' (
|
customJVMOpts = mkOption {
|
||||||
with types;
|
description = "Additional JVM options";
|
||||||
coercedTo
|
type = types.coercedTo
|
||||||
(listOf str)
|
types.str
|
||||||
(lib.concatStringsSep " ")
|
(lib.splitString " ")
|
||||||
(separatedString " ")
|
(types.listOf types.str);
|
||||||
) "" "Custom JVM options for this server.";
|
default = [ ];
|
||||||
|
example = [
|
||||||
|
"-Dminecraft.api.env=custom"
|
||||||
|
"-Dminecraft.api.auth.host=https://mcauth.example.space/auth"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
operators = mkOption {
|
operators = mkOption {
|
||||||
type = types.attrsOf (
|
type = types.attrsOf (
|
||||||
|
|
@ -379,7 +385,7 @@ in {
|
||||||
"-Xmx${serverCfg.memory.max}"
|
"-Xmx${serverCfg.memory.max}"
|
||||||
"-Xms${serverCfg.memory.min}"
|
"-Xms${serverCfg.memory.min}"
|
||||||
]
|
]
|
||||||
++ lib.optional (serverCfg.customJVMOpts != "") serverCfg.customJVMOpts
|
++ serverCfg.customJVMOpts
|
||||||
);
|
);
|
||||||
|
|
||||||
autoStart = serverCfg.autoStart;
|
autoStart = serverCfg.autoStart;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue