Update: add option to append more jvm options
This commit is contained in:
parent
11205e4906
commit
5955db3819
1 changed files with 51 additions and 41 deletions
|
|
@ -214,6 +214,14 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
customJVMOpts = mkOpt' (
|
||||
with types;
|
||||
coercedTo
|
||||
(listOf str)
|
||||
(lib.concatStringsSep " ")
|
||||
(separatedString " ")
|
||||
) "" "Custom JVM options for this server.";
|
||||
|
||||
operators = mkOption {
|
||||
type = types.attrsOf (
|
||||
types.coercedTo minecraftUUID (v: {uuid = v;}) (
|
||||
|
|
@ -313,8 +321,6 @@ in {
|
|||
# };
|
||||
# };
|
||||
|
||||
|
||||
|
||||
schedules = mkOption {
|
||||
type = types.attrsOf (types.submodule ({name, ...}: {
|
||||
options = {
|
||||
|
|
@ -367,7 +373,15 @@ in {
|
|||
lib.mapAttrs (serverName: serverCfg: {
|
||||
enable = serverCfg.enable;
|
||||
package = serverCfg.package;
|
||||
jvmOpts = "-Xmx${serverCfg.memory.max} -Xms${serverCfg.memory.min}";
|
||||
|
||||
jvmOpts = lib.concatStringsSep " " (
|
||||
[
|
||||
"-Xmx${serverCfg.memory.max}"
|
||||
"-Xms${serverCfg.memory.min}"
|
||||
]
|
||||
++ lib.optional (serverCfg.customJVMOpts != "") serverCfg.customJVMOpts
|
||||
);
|
||||
|
||||
autoStart = serverCfg.autoStart;
|
||||
|
||||
symlinks = serverCfg.symlinks;
|
||||
|
|
@ -485,7 +499,6 @@ in {
|
|||
cfg.servers
|
||||
);
|
||||
|
||||
|
||||
# systemd.services = lib.mkMerge (
|
||||
# lib.mapAttrsToList (serverName: serverCfg:
|
||||
# lib.mkIf serverCfg.userActivity.enable {
|
||||
|
|
@ -506,7 +519,6 @@ in {
|
|||
# ) cfg.servers
|
||||
# );
|
||||
|
||||
|
||||
# systemd.timers = lib.mkMerge (
|
||||
# lib.mapAttrsToList (serverName: serverCfg:
|
||||
# lib.mkIf serverCfg.userActivity.enable {
|
||||
|
|
@ -523,8 +535,6 @@ in {
|
|||
# ) cfg.servers
|
||||
# );
|
||||
|
||||
|
||||
|
||||
# this is building the scripts for the user
|
||||
# Those are the prewritten scripts from the ./Script dir
|
||||
environment.systemPackages = lib.flatten (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue