nixos-config/modules/minecraft/vault.nix

27 lines
523 B
Nix
Raw Normal View History

2022-06-12 15:39:15 +00:00
{
config,
lib,
options,
pkgs,
...
}:
with lib; let
vault = pkgs.callPackage ../../packages/minecraft/vault.nix {};
2022-02-20 19:14:35 +00:00
cfg = config.services.minecraft.vault;
opt = options.services.minecraft.vault;
2022-06-12 15:39:15 +00:00
in {
2022-02-20 19:14:35 +00:00
options.services.minecraft.vault.enable = mkOption {
default = false;
type = types.bool;
description = "Enable Vault";
};
config = mkIf cfg.enable {
2022-06-12 15:39:15 +00:00
services.minecraft.plugins = [
{
package = vault;
startScript = pkgs.writeScript "dummy" "";
}
];
2022-02-20 19:14:35 +00:00
};
}