camelot: Add minecraft server

This commit is contained in:
Victor Mignot 2024-10-26 15:15:06 +02:00
parent 4fee95b03c
commit c9b9cf00b1
Signed by: dala
GPG key ID: 5E7F2CE1BEAFED3D
3 changed files with 24 additions and 0 deletions

View file

@ -55,6 +55,7 @@
my.server.mollysocket.enable = true;
my.server.blog.enable = true;
my.server.papermc.enable = true;
my.users = {
dala = {

View file

@ -5,5 +5,6 @@
./nginx.nix
./mollysocket.nix
./blog.nix
./minecraft.nix
];
}

View file

@ -0,0 +1,22 @@
{
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;
};
};
}