mc: add
crispy-caesus crispy@crispy-caesus.eu
Sun, 12 Apr 2026 22:01:00 +0200
4 files changed,
96 insertions(+),
4 deletions(-)
M
configuration.nix
→
configuration.nix
@@ -8,6 +8,7 @@ ./modules/wireguard.nix
./modules/server.nix ./modules/git.nix ./modules/gpg.nix + ./modules/minecraft.nix ]; boot.loader.systemd-boot.enable = true;
M
flake.lock
→
flake.lock
@@ -43,6 +43,22 @@ "repo": "nix-darwin",
"type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [@@ -64,6 +80,26 @@ "repo": "home-manager",
"type": "github" } }, + "nix-minecraft": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1775791757, + "narHash": "sha256-3BS1Hw+3A3uf4G/8zwts3ZgxSnYq0y+QntbwO+b6KEw=", + "owner": "infinidoge", + "repo": "nix-minecraft", + "rev": "c4c6a33affcc15cde3df06083e96cda87f9a7627", + "type": "github" + }, + "original": { + "owner": "infinidoge", + "repo": "nix-minecraft", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1754028485,@@ -82,6 +118,22 @@ }
}, "nixpkgs_2": { "locked": { + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { "lastModified": 1775002709, "narHash": "sha256-d3Yx83vSrN+2z/loBh4mJpyRqr9aAJqlke4TkpFmRJA=", "owner": "nixos",@@ -99,10 +151,26 @@ },
"root": { "inputs": { "agenix": "agenix", - "nixpkgs": "nixpkgs_2" + "nix-minecraft": "nix-minecraft", + "nixpkgs": "nixpkgs_3" } }, "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
M
flake.nix
→
flake.nix
@@ -1,22 +1,21 @@
{ - description = "This might just be the crispiest flake out there"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; agenix.url = "github:ryantm/agenix"; + nix-minecraft.url = "github:infinidoge/nix-minecraft"; }; outputs = inputs: { nixosConfigurations.RFC-7168 = inputs.nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; modules = [ { nix.settings.experimental-features = ["nix-command" "flakes"]; } inputs.agenix.nixosModules.age ./configuration.nix ]; }; - }; - }
A
modules/minecraft.nix
@@ -0,0 +1,24 @@
+{ pkgs, lib, inputs, ... }: + +{ + imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ]; + nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; + + services.minecraft-servers = { + enable = true; + eula = true; + + servers = { + gc = { + enable = true; + package = pkgs.purpurServers.purpur-1_21_11; + + serverProperties = {/* */}; + whitelist = {/* */}; + + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ 25565 ]; +}