forked from wurzel/fruitbasket
minecraft: remove
vorerst deaktiviert bis sich jemand beschwert die daten verbleiben in /srv/minecraft
This commit is contained in:
parent
bc46330abe
commit
d9dec34e3a
3 changed files with 1 additions and 117 deletions
|
@ -1,38 +0,0 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"minecraft-server"
|
||||
];
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
servers.ifsr = {
|
||||
enable = true;
|
||||
package = pkgs.fabricServers.fabric-1_21;
|
||||
jvmOpts = "-Xmx8192M -Xms8192M";
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
extraInputRules = ''
|
||||
ip saddr { 141.30.0.0/16, 141.76.0.0/16, 217.160.244.15/32 } tcp dport 25565 accept comment "Allow minecraft access from TU network and jonas monitoring"
|
||||
'';
|
||||
};
|
||||
users.users.minecraft = {
|
||||
isNormalUser = true;
|
||||
isSystemUser = lib.mkForce false;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILkxTuzjS3EswMfj+wSKu9ciRyStvjDlDUXzkqEUGDaP rouven@thinkpad"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOhdjiPvtAo/ZV36RjBBPSlixzeP3VN6cqa4YAmM5uXM ff00005@ff00005-laptop" # malte
|
||||
];
|
||||
};
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "minecraft" ];
|
||||
commands = [
|
||||
{ command = "/run/current-system/sw/bin/systemctl restart minecraft-server-ifsr"; options = [ "NOPASSWD" ]; }
|
||||
{ command = "/run/current-system/sw/bin/systemctl start minecraft-server-ifsr"; options = [ "NOPASSWD" ]; }
|
||||
{ command = "/run/current-system/sw/bin/systemctl stop minecraft-server-ifsr"; options = [ "NOPASSWD" ]; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue