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 | |
| parent | 3559bc288e142d76d94d329f6efb66abe53b5d0b (diff) | |
pin
| -rw-r--r-- | flake.lock | 36 | ||||
| -rw-r--r-- | flake.nix | 4 | ||||
| -rw-r--r-- | minecraft.nix | 14 |
3 files changed, 41 insertions, 13 deletions
@@ -2,20 +2,40 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1790055231, - "narHash": "sha256-wQZif6Lyrg1IDl8k68Gwa3OK9PermeRsjdKgso4K1VA=", - "rev": "b6c98e9e6633ee64753b594ff4a5febf0367fc00", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1078010.b6c98e9e6633/nixexprs.tar.zst" + "lastModified": 1790340521, + "narHash": "sha256-cRrWlIjVRJ6BHDr9caUdXsZ3owzWIKYHpNmGPHBInIU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f5c082a40f7571c266e74e80ae2e68aadd8a9fc7", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst" + "owner": "nixos", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1790323409, + "narHash": "sha256-VVTPf+Hyd5ebpjBMHmrLMSBIeW6ls48Bqtosj7CNKLA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e94cb152ed51bd6e24eb4a41f1460252beb52cd2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, @@ -2,11 +2,13 @@ description = "kassouni.net server"; inputs = { - nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; }; outputs = inputs: { nixosConfigurations.kassouni-net = inputs.nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; modules = [ ./configuration.nix ]; }; 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; |
