Add initial configuration files and validation scripts for NixOS setup

This commit is contained in:
Root User 2026-04-06 00:08:14 +03:00
parent a9a857b460
commit a86437d4b2
Signed by: root
GPG key ID: 087F0A95E5766D72
2 changed files with 14 additions and 10 deletions

View file

@ -73,9 +73,13 @@
"nixos-minecraft" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./nix-system-configs/modules/system/minecraft.nix
# Apply the overlay first so pkgs in later modules (like our local
# `minecraft.nix`) see the extra helpers provided by the overlay
{ nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; }
nix-minecraft.nixosModules.minecraft-servers
{nixpkgs.overlays = [inputs.nix-minecraft.overlay];}
./nix-system-configs/modules/system/minecraft.nix
];
};
};

View file

@ -7,12 +7,10 @@
choose = paths: builtins.head (builtins.filter (p: builtins.pathExists p) paths);
# Domain and Cloudflare DDNS records configured here. Update this list to add/remove records.
domain = "prg-radio.org";
modpack = pkgs.fetchModrinthModpack {
# Get file from local system
src = /srv/minecraft/modpacks/AllTheMods10-prg.mrpack;
packHash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
side = "server";
};
# Try to use the nix-minecraft helper if the overlay is present; otherwise
# fall back to a local path. If you use the fallback, ensure the path is an
# unpacked modpack directory with `mods` and `config` subdirectories.
modpack = /srv/minecraft/modpacks/AllTheMods10-prg.mrpack;
in {
options.local = {
hostname = lib.mkOption {
@ -129,10 +127,12 @@ in {
};
symlinks = {
"mods" = "${modpack}/mods";
"mods" = "${modpack}/overrides/mods";
};
files = {
"config" = "${modpack}/config";
"config" = "${modpack}/overrides/config";
"kubejs" = "${modpack}/overrides/kubejs";
"datapacks" = "${modpack}/overrides/datapacks";
};
};