mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add astral
This commit is contained in:
parent
c93f124c6f
commit
22390d5456
11 changed files with 188 additions and 12 deletions
36
modules/nixos/server/gaming/astral.nix
Normal file
36
modules/nixos/server/gaming/astral.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, lib, config, inputs, ... }:
|
||||
let
|
||||
modpack = pkgs.fetchPackwizModpack {
|
||||
# version = "main";
|
||||
url = "https://github.com/nix-astral/create-astral/raw/main/pack.toml";
|
||||
packHash = "sha256-QcUg4PRxgGdQIB5d+XnJCmhh6+r/zDtWRFSTkSOR1ik=";
|
||||
manifestHash = "sha256:0kcwbj2f9h30v8kwxhaxzzs2gi3bydzmjgxb2ysf8jv1av1l21n3";
|
||||
};
|
||||
mcVersion = modpack.manifest.versions.minecraft;
|
||||
fabricVersion = modpack.manifest.versions.fabric;
|
||||
serverVersion = lib.replaceStrings [ "." ] [ "_" ] "fabric-${mcVersion}";
|
||||
|
||||
in {
|
||||
options.mods.server.astral = {
|
||||
enable = lib.mkEnableOption {
|
||||
default = false;
|
||||
description = "enables minecraft create astral server";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.server.astral.enable {
|
||||
services.minecraft-servers.servers.astral = {
|
||||
enable = true;
|
||||
jvmOpts = (import ./aikar-flags.nix) "4G";
|
||||
package = pkgs.fabricServers.${serverVersion}.override {
|
||||
loaderVersion = fabricVersion;
|
||||
};
|
||||
symlinks = {
|
||||
"global_packs" = "${modpack}/global_packs";
|
||||
"kubejs" = "${modpack}/kubejs";
|
||||
"config" = "${modpack}/config";
|
||||
"mods" = "${modpack}/mods";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue