nixos/kelder: Add Minecraft server
This commit is contained in:
parent
dd31b95945
commit
3a5679a76d
@ -121,6 +121,7 @@ in
|
||||
username = "token";
|
||||
passwordFile = config.age.secrets."kelder/ddclient-cloudflare.key".path;
|
||||
};
|
||||
|
||||
samba = {
|
||||
enable = true;
|
||||
enableNmbd = true;
|
||||
@ -135,6 +136,20 @@ in
|
||||
};
|
||||
};
|
||||
samba-wsdd.enable = true;
|
||||
|
||||
minecraft-server = {
|
||||
enable = true;
|
||||
package = pkgs.minecraftServers.vanilla-1-19;
|
||||
declarative = true;
|
||||
eula = true;
|
||||
whitelist = {
|
||||
devplayer0 = "6d7d971b-ce10-435b-85c5-c99c0d8d288c";
|
||||
};
|
||||
serverProperties = {
|
||||
motd = "Simpcraft";
|
||||
white-list = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
@ -245,6 +260,8 @@ in
|
||||
|
||||
firewall = {
|
||||
trustedInterfaces = [ "ctrs" ];
|
||||
tcp.allowed = [ 25565 ];
|
||||
udp.allowed = [ 25565 ];
|
||||
nat = {
|
||||
enable = true;
|
||||
externalInterface = "{ et1g0, estuary }";
|
||||
|
@ -408,6 +408,16 @@ in
|
||||
}
|
||||
];
|
||||
})
|
||||
(mkIf config.services.minecraft-server.enable {
|
||||
my.tmproot.persistence.config.directories = [
|
||||
{
|
||||
directory = config.services.minecraft-server.dataDir;
|
||||
mode = "0750";
|
||||
user = "minecraft";
|
||||
group = "minecraft";
|
||||
}
|
||||
];
|
||||
})
|
||||
(mkIf config.services.samba.enable {
|
||||
my.tmproot.persistence.config.directories = [
|
||||
"/var/lib/samba"
|
||||
|
Loading…
Reference in New Issue
Block a user