This commit is contained in:
2026-01-05 10:23:29 -06:00
parent f9eca3ebde
commit ea3c826c63
4 changed files with 74 additions and 1089 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,79 @@
{ config, lib, pkgs, nix-minecraft, ... }: {
options.sysconfig.virtualization.minecraft.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
options.sysconfig = {
virtualization.minecraft.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
services.minecraft.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
imports = [
nix-minecraft.nixosModules.minecraft-servers
];
config = lib.mkIf config.sysconfig.virtualization.minecraft.enable {
config = lib.mkIf config.sysconfig.services.minecraft.enable {
nixpkgs.overlays = [ nix-minecraft.overlay ];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
dataDir = "/var/lib/mcservers";
#managementSystem.systemd-socket.enable = true; #temp
servers = {
bedrock = {
enable = true;
package = pkgs.fabricServers.fabric-1_21_8;
serverProperties = {
server-port = 25566;
gamemode = "survival";
difficulty = 2;
white-list = true;
motd = "Test";
};
whitelist = {
"MeasureTwice66" = "a4032062-293d-484d-a790-9f52475836bb";
"651sonic" = "936a3fb0-4548-4557-975b-7794e97a3afc";
"Griffin12_" = "6a1f56d9-f712-4723-a031-e5437a389bb3";
};
autoStart = true;
};
modded = {
enable = false;
#package = pkgs.fabricServers.fabric-1_21_1.override { loaderVersion = "0.16.14"; };
package = pkgs.fabricServers.fabric-1_21_1;
jvmOpts = [ "-Xms8000M" "-Xmx12000M" ];
serverProperties = {
server-port = 25566;
gamemode = "survival";
white-list = true;
allow-flight = true;
motd = "Ex-plo-sion!!!";
};
whitelist = {
"MeasureTwice66" = "a4032062-293d-484d-a790-9f52475836bb";
"651sonic" = "936a3fb0-4548-4557-975b-7794e97a3afc";
"Griffin12_" = "6a1f56d9-f712-4723-a031-e5437a389bb3";
};
autoStart = true;
symlinks = {
"mods" = ./mods;
};
};
};
};
} // (lib.mkIf config.sysconfig.virtualization.minecraft.enable {
networking = {
firewall = {
@@ -42,9 +109,9 @@
config = {
imports = [
/*imports = [
nix-minecraft.nixosModules.minecraft-servers
];
];*/
environment.systemPackages = with pkgs; [ tmux ];
@@ -105,5 +172,5 @@
system.stateVersion = "25.05";
};
};
};
});
}

View File

@@ -5,7 +5,6 @@
./openssh
./pipewire
./containers
./minecraft
./sddm
./novnc
./kdePlasma6

View File

@@ -1,70 +0,0 @@
{ config, lib, pkgs, nix-minecraft, ... }: {
options.sysconfig.services.minecraft.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
imports = [
nix-minecraft.nixosModules.minecraft-servers
];
config = lib.mkIf config.sysconfig.services.minecraft.enable {
nixpkgs.overlays = [ nix-minecraft.overlay ];
services.minecraft-servers = {
enable = true;
eula = true;
openFirewall = true;
dataDir = "/var/lib/mcservers";
#managementSystem.systemd-socket.enable = true; #temp
servers = {
bedrock = {
enable = true;
package = pkgs.fabricServers.fabric-1_21_8;
serverProperties = {
server-port = 25566;
gamemode = "survival";
difficulty = 2;
white-list = true;
motd = "Test";
};
whitelist = {
"MeasureTwice66" = "a4032062-293d-484d-a790-9f52475836bb";
"651sonic" = "936a3fb0-4548-4557-975b-7794e97a3afc";
"Griffin12_" = "6a1f56d9-f712-4723-a031-e5437a389bb3";
};
autoStart = true;
};
modded = {
enable = false;
#package = pkgs.fabricServers.fabric-1_21_1.override { loaderVersion = "0.16.14"; };
package = pkgs.fabricServers.fabric-1_21_1;
jvmOpts = [ "-Xms8000M" "-Xmx12000M" ];
serverProperties = {
server-port = 25566;
gamemode = "survival";
white-list = true;
allow-flight = true;
motd = "Ex-plo-sion!!!";
};
whitelist = {
"MeasureTwice66" = "a4032062-293d-484d-a790-9f52475836bb";
"651sonic" = "936a3fb0-4548-4557-975b-7794e97a3afc";
"Griffin12_" = "6a1f56d9-f712-4723-a031-e5437a389bb3";
};
autoStart = true;
symlinks = {
"mods" = ./mods;
};
};
};
};
};
}