summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock36
-rw-r--r--flake.nix4
-rw-r--r--minecraft.nix14
3 files changed, 41 insertions, 13 deletions
diff --git a/flake.lock b/flake.lock
index 698d13e..01d5bde 100644
--- a/flake.lock
+++ b/flake.lock
@@ -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"
}
}
},
diff --git a/flake.nix b/flake.nix
index 47e0172..9a0e7c9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;