Add statech

This commit is contained in:
muon 2025-07-27 09:49:07 +00:00
parent 65d4e2cc48
commit c7c99f8ba6
8 changed files with 135 additions and 74 deletions

View file

@ -203,11 +203,11 @@
"passthru": null, "passthru": null,
"pinned": false, "pinned": false,
"src": { "src": {
"sha256": "sha256-kRNaJqikNMKJj4xFq2sLOzI9I1EVjHfXFzFo3VDbXq0=", "sha256": "sha256-OZgL/KKR5JP5PL6lq4hqqKtmhNzgyWIM0y6lXw5sQls=",
"type": "tarball", "type": "tarball",
"url": "https://thunderstore.io/package/download/ValheimModding/JsonDotNET/13.0.3/" "url": "https://thunderstore.io/package/download/ValheimModding/JsonDotNET/13.0.4/"
}, },
"version": "13.0.3" "version": "13.0.4"
}, },
"valheim.lazyvikings": { "valheim.lazyvikings": {
"cargoLocks": null, "cargoLocks": null,

View file

@ -115,10 +115,10 @@
}; };
"valheim.jsondotnet" = { "valheim.jsondotnet" = {
pname = "valheim.jsondotnet"; pname = "valheim.jsondotnet";
version = "13.0.3"; version = "13.0.4";
src = fetchTarball { src = fetchTarball {
url = "https://thunderstore.io/package/download/ValheimModding/JsonDotNET/13.0.3/"; url = "https://thunderstore.io/package/download/ValheimModding/JsonDotNET/13.0.4/";
sha256 = "sha256-kRNaJqikNMKJj4xFq2sLOzI9I1EVjHfXFzFo3VDbXq0="; sha256 = "sha256-OZgL/KKR5JP5PL6lq4hqqKtmhNzgyWIM0y6lXw5sQls=";
}; };
}; };
"valheim.lazyvikings" = { "valheim.lazyvikings" = {

128
flake.lock generated
View file

@ -37,11 +37,11 @@
"base16-helix": { "base16-helix": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1736852337, "lastModified": 1748408240,
"narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "base16-helix", "repo": "base16-helix",
"rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -70,11 +70,11 @@
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1744642301, "lastModified": 1748383148,
"narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=",
"owner": "rafaelmardojai", "owner": "rafaelmardojai",
"repo": "firefox-gnome-theme", "repo": "firefox-gnome-theme",
"rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -101,11 +101,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1747046372,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -116,11 +116,11 @@
}, },
"flake-compat_3": { "flake-compat_3": {
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1747046372,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -137,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733312601, "lastModified": 1743550720,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -155,11 +155,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1731533236,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -197,11 +197,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742649964, "lastModified": 1747372754,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -256,11 +256,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747978958, "lastModified": 1750127463,
"narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", "narHash": "sha256-K2xFtlD3PcKAZriOE3LaBLYmVfGQu+rIF4Jr1RFYR0Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7419250703fd5eb50e99bdfb07a86671939103ea", "rev": "28eef8722d1af18ca13e687dbf485e1c653a0402",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +277,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747763032, "lastModified": 1748737919,
"narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", "narHash": "sha256-5kvBbLYdp+n7Ftanjcs6Nv+UO6sBhelp6MIGJ9nWmjQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", "rev": "5675a9686851d9626560052a032c4e14e533c1fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -297,11 +297,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1747908601, "lastModified": 1749976779,
"narHash": "sha256-cSzec5IT7Imx9g+Rhpt4GxrLiNF++V+guzYCnWUjhAI=", "narHash": "sha256-Mjb4qsu+Fma1cXe1lGo0GqisvsiUeW0LfacziI7C7oM=",
"owner": "thiagokokada", "owner": "thiagokokada",
"repo": "nix-alien", "repo": "nix-alien",
"rev": "798541edff98cfa895941abe35f3e056f319a193", "rev": "f8716e36f8864e2f50663fde364ddd8dce5d937f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -318,11 +318,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1746934494, "lastModified": 1749960154,
"narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=", "narHash": "sha256-EWlr9MZDd+GoGtZB4QsDzaLyaDQPGnRY03MFp6u2wSg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff", "rev": "424a40050cdc5f494ec45e46462d288f08c64475",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -338,11 +338,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1720748198, "lastModified": 1750164803,
"narHash": "sha256-2AxCoCoBnFJcZjp9Se7W7JgQ88rwMLUwi5EAcsj5B9I=", "narHash": "sha256-aLDTGNh84IcJTT9m380uW3wHogKbHcTcK9uUunALdNU=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "a1ab2a1353a38a6642fbc69f118adc08faf7dbcb", "rev": "efaa1a2497ce1988d9b3bc7bb395abdf8177e0a3",
"revCount": 628, "revCount": 925,
"type": "git", "type": "git",
"url": "https://codeberg.org/nix-astral/nix-minecraft.git" "url": "https://codeberg.org/nix-astral/nix-minecraft.git"
}, },
@ -353,11 +353,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1747179050, "lastModified": 1749794982,
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -369,11 +369,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1715266358, "lastModified": 1748929857,
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f1010e0469db743d14519a1efd37e23f8513d714", "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -385,11 +385,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1747744144, "lastModified": 1749794982,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -401,11 +401,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1747542820, "lastModified": 1748460289,
"narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -428,11 +428,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1746056780, "lastModified": 1748730660,
"narHash": "sha256-/emueQGaoT4vu0QjU9LDOG5roxRSfdY0K2KkxuzazcM=", "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "d476cd0972dd6242d76374fcc277e6735715c167", "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -459,11 +459,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747603214, "lastModified": 1750119275,
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -515,11 +515,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1748028561, "lastModified": 1750023464,
"narHash": "sha256-IgtJU6n9vR3nBUdcXrc7K9E+Y/G/4P6hFifGRr1tXMU=", "narHash": "sha256-gBsstni5rgh1vt2SNThh51GNvxMDCjEBfpPksS0ig/c=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "34b5930894d8315401d93bd8a9a6635e1cd28eff", "rev": "a14e525723c1c837b2ceacd8a37cba1f0b5e76c2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -594,11 +594,11 @@
"tinted-schemes": { "tinted-schemes": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1744974599, "lastModified": 1748180480,
"narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "schemes", "repo": "schemes",
"rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -610,11 +610,11 @@
"tinted-tmux": { "tinted-tmux": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1745111349, "lastModified": 1748740859,
"narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=",
"owner": "tinted-theming", "owner": "tinted-theming",
"repo": "tinted-tmux", "repo": "tinted-tmux",
"rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -10,6 +10,7 @@
stylix.url = "github:danth/stylix"; stylix.url = "github:danth/stylix";
nix-minecraft.url = "git+https://codeberg.org/nix-astral/nix-minecraft.git"; nix-minecraft.url = "git+https://codeberg.org/nix-astral/nix-minecraft.git";
# nix-minecraft.url = "github:Infinidoge/nix-minecraft";
nix-alien.url = "github:thiagokokada/nix-alien"; nix-alien.url = "github:thiagokokada/nix-alien";
valheim-server.url = "github:kmjayadeep/valheim-server-flake"; valheim-server.url = "github:kmjayadeep/valheim-server-flake";

View file

@ -59,10 +59,12 @@ in {
# Proprietary </3 # Proprietary </3
mods.unfree.steam.enable = false; mods.unfree.steam.enable = false;
mods.unfree.nvidia.enable = false; mods.unfree.nvidia.enable = false;
mods.unfree.minecraft.enable = false; mods.unfree.minecraft.enable = true;
mods.unfree.valheim.enable = true;
mods.unfree.valheim.enable = false;
mods.server.vrising.enable = false; mods.server.vrising.enable = false;
mods.server.statech.enable = true;
# mods.server.astral.enable = true;
# Hardware preferences # Hardware preferences

View file

@ -21,7 +21,6 @@ in with lib; {
"zoxide" "zoxide"
"dircolors" "dircolors"
"nix-index" "nix-index"
"thefuck"
"lazygit" "lazygit"
"fd" "fd"

View file

@ -6,7 +6,7 @@
}; };
}; };
imports = [ ./astral.nix ./vrising.nix ]; imports = [ ./astral.nix ./vrising.nix ./statech.nix ];
config = lib.mkIf config.mods.server.gaming.enable { config = lib.mkIf config.mods.server.gaming.enable {
mods.server.astral.enable = true; mods.server.astral.enable = true;

View file

@ -0,0 +1,59 @@
{ pkgs, lib, config, inputs, sources, ... }:
let
inherit (inputs.nix-minecraft.lib) collectFilesAt;
modpack = pkgs.fetchPackwizModpack {
# version = "main";
url = "https://github.com/nix-astral/statech/raw/modrinth/pack.toml";
packHash = "sha256-osXcGvsoaTgu7z4eamDL/wiDewM+rge4gdu54I7wxXc=";
manifestHash =
"sha256:081s5qzx3v1cpb8a8ns77z3hqcd7df52b55cr0xmqr2ziir8ml07";
};
mcVersion = modpack.manifest.versions.minecraft;
fabricVersion = modpack.manifest.versions.fabric;
serverVersion = lib.replaceStrings [ "." ] [ "_" ] "fabric-${mcVersion}";
in {
options.mods.server.statech = {
enable = lib.mkEnableOption {
default = false;
description = "enables minecraft statech server";
};
memory = lib.mkOption {
default = "6G";
description = "server detitated wam";
};
autoStart = lib.mkEnableOption {
default = true;
description = "start server on boot";
};
};
config = lib.mkIf config.mods.server.statech.enable {
services.minecraft-servers.servers.statech = {
enable = true;
serverProperties = { online-mode = true; };
autoStart = config.mods.server.statech.autoStart;
jvmOpts = (import ./aikar-flags.nix) config.mods.server.statech.memory;
package = pkgs.fabricServers.${serverVersion}.override {
loaderVersion = fabricVersion;
};
symlinks = {
# "global_packs" = "${modpack}/global_packs";
"kubejs" = "${modpack}/kubejs";
"config" = "${modpack}/config";
"mods" = "${modpack}/mods";
"resourcepacks" = "${modpack}/resourcepacks";
};
# symlinks =
# # collectFilesAt modpack "global_packs" //
# collectFilesAt modpack "kubejs" // collectFilesAt modpack "config"
# // collectFilesAt modpack "resourcepacks"
# // collectFilesAt modpack "mods" // {
# } // (lib.attrsets.mapAttrs' (n: v:
# lib.attrsets.nameValuePair
# ("mods/" + lib.strings.removePrefix "statech." n) v.src)
# (lib.attrsets.filterAttrs (n: v: lib.strings.hasPrefix "statech." n)
# sources));
};
};
}