diff options
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; |
