add essentialsx-chat and essentialsx-spawn

This commit is contained in:
Charlotte 🦝 Delenk 2022-02-20 21:57:49 +01:00
parent 75a59f57c5
commit 40ad3f80cf
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -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" "";
}];
};
}