From d9dec34e3a27cfcc96c3754cde2dec6a054778c2 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Thu, 16 Jan 2025 14:53:49 +0100 Subject: [PATCH] minecraft: remove vorerst deaktiviert bis sich jemand beschwert die daten verbleiben in /srv/minecraft --- flake.lock | 74 +---------------------------------- flake.nix | 6 --- modules/minecraft/default.nix | 38 ------------------ 3 files changed, 1 insertion(+), 117 deletions(-) delete mode 100644 modules/minecraft/default.nix diff --git a/flake.lock b/flake.lock index 613e4fc..2e6b446 100644 --- a/flake.lock +++ b/flake.lock @@ -40,22 +40,6 @@ "url": "https://git.ifsr.de/ese/manual-website" } }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -110,24 +94,6 @@ "type": "github" } }, - "flake-utils_4": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "kpp": { "inputs": { "nixpkgs": [ @@ -190,28 +156,6 @@ "type": "github" } }, - "nix-minecraft": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1736991798, - "narHash": "sha256-G4eufaog7+ZJ5zOYG19/QrZTQlIuxI5QUSDaXoJqAZo=", - "owner": "Infinidoge", - "repo": "nix-minecraft", - "rev": "54c96a05a61c96f9a78f4c65b95f358c93f2595e", - "type": "github" - }, - "original": { - "owner": "Infinidoge", - "repo": "nix-minecraft", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1730531603, @@ -309,7 +253,6 @@ "ese-manual": "ese-manual", "kpp": "kpp", "nix-index-database": "nix-index-database", - "nix-minecraft": "nix-minecraft", "nixpkgs": "nixpkgs_2", "print-interface": "print-interface", "sops-nix": "sops-nix", @@ -395,21 +338,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -434,7 +362,7 @@ }, "vscode-server": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_3" }, "locked": { diff --git a/flake.nix b/flake.nix index b03d207..75adf68 100755 --- a/flake.nix +++ b/flake.nix @@ -19,8 +19,6 @@ url = "github:fsr/course-management"; # inputs.nixpkgs.follows = "nixpkgs"; }; - nix-minecraft.url = "github:Infinidoge/nix-minecraft"; - nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { self @@ -32,7 +30,6 @@ , vscode-server , course-management , print-interface - , nix-minecraft , ... }@inputs: let @@ -71,7 +68,6 @@ ese-manual.nixosModules.default course-management.nixosModules.default vscode-server.nixosModules.default - nix-minecraft.nixosModules.minecraft-servers ./hosts/quitte/configuration.nix ./options @@ -82,7 +78,6 @@ ./modules/courses ./modules/wiki ./modules/matrix - ./modules/minecraft ./modules/keycloak ./modules/monitoring @@ -100,7 +95,6 @@ { nixpkgs.overlays = [ self.overlays.default - nix-minecraft.overlay ]; sops.defaultSopsFile = ./secrets/quitte.yaml; } diff --git a/modules/minecraft/default.nix b/modules/minecraft/default.nix deleted file mode 100644 index a51b5d5..0000000 --- a/modules/minecraft/default.nix +++ /dev/null @@ -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" ]; } - ]; - } - ]; -}