add essentialsx-chat and essentialsx-spawn
This commit is contained in:
parent
75a59f57c5
commit
40ad3f80cf
1 changed files with 35 additions and 8 deletions
|
@ -12,15 +12,42 @@ in
|
|||
description = "Enable EssentialsX";
|
||||
type = types.bool;
|
||||
};
|
||||
enableChat = mkOption {
|
||||
default = true;
|
||||
description = "Enable EssentialsX Chat";
|
||||
type = types.bool;
|
||||
};
|
||||
enableSpawn = mkOption {
|
||||
default = true;
|
||||
description = "Enable EssentialsX Spawn";
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.minecraft = {
|
||||
vault.enable = config.services.minecraft.luckperms.enable;
|
||||
config = mkIf cfg.enable
|
||||
{
|
||||
services.minecraft = {
|
||||
vault.enable = config.services.minecraft.luckperms.enable;
|
||||
};
|
||||
services.minecraft.plugins = lib.mkMerge [
|
||||
[{
|
||||
package = essentialsx.essentialsx;
|
||||
startScript = pkgs.writeScript "dummy" "";
|
||||
}]
|
||||
(
|
||||
mkIf cfg.enableChat
|
||||
[{
|
||||
package = essentialsx.essentialsx-chat;
|
||||
startScript = pkgs.writeScript "dummy" "";
|
||||
}]
|
||||
)
|
||||
(
|
||||
mkIf cfg.enableSpawn
|
||||
[{
|
||||
package = essentialsx.essentialsx-spawn;
|
||||
startScript = pkgs.writeScript "dummy" "";
|
||||
}]
|
||||
)
|
||||
];
|
||||
};
|
||||
services.minecraft.plugins = [{
|
||||
package = essentialsx.essentialsx;
|
||||
startScript = pkgs.writeScript "dummy" "";
|
||||
}];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue