camelot: Add minecraft server
This commit is contained in:
parent
4fee95b03c
commit
c9b9cf00b1
|
@ -55,6 +55,7 @@
|
|||
|
||||
my.server.mollysocket.enable = true;
|
||||
my.server.blog.enable = true;
|
||||
my.server.papermc.enable = true;
|
||||
|
||||
my.users = {
|
||||
dala = {
|
||||
|
|
|
@ -5,5 +5,6 @@
|
|||
./nginx.nix
|
||||
./mollysocket.nix
|
||||
./blog.nix
|
||||
./minecraft.nix
|
||||
];
|
||||
}
|
||||
|
|
22
modules/server/minecraft.nix
Normal file
22
modules/server/minecraft.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue