diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-09-25 23:56:30 -0700 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-09-25 23:56:30 -0700 |
| commit | dcf29267e716b3ca241ceda23dfeb5014c6c4317 (patch) | |
| tree | 87207654b9c35bae146b078a111c2d9e0c88e3c6 /minecraft.nix | |
| parent | 3559bc288e142d76d94d329f6efb66abe53b5d0b (diff) | |
pin
Diffstat (limited to 'minecraft.nix')
| -rw-r--r-- | minecraft.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/minecraft.nix b/minecraft.nix index 97ebf1d..1969148 100644 --- a/minecraft.nix +++ b/minecraft.nix @@ -1,10 +1,16 @@ -{lib, ...}:{ - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "minecraft-server" - ]; +{inputs, lib, pkgs, ...}: let + allowMinecraft = pkg: builtins.elem (lib.getName pkg) [ "minecraft-server" ]; + + unstable = import inputs.nixpkgs-unstable { + inherit (pkgs.stdenv.hostPlatform) system; + config.allowUnfreePredicate = allowMinecraft; + }; +in { + nixpkgs.config.allowUnfreePredicate = allowMinecraft; services.minecraft-server = { enable = true; + package = unstable.minecraft-server; eula = true; openFirewall = true; declarative = true; |
