23 lines
356 B
Nix
23 lines
356 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib;
|
|
{
|
|
options.my.server.papermc.enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
|
|
config = mkIf config.my.server.papermc.enable {
|
|
services.minecraft-server = {
|
|
enable = true;
|
|
package = pkgs.papermc;
|
|
dataDir = "/srv/minecraft";
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|