diff options
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | flake.lock | 26 | ||||
| -rw-r--r-- | flake.nix | 39 | ||||
| -rw-r--r-- | nix/default.nix | 9 | ||||
| -rw-r--r-- | nix/files/.minecraft/packwiz-installer-bootstrap.jar | bin | 0 -> 98989 bytes | |||
| -rw-r--r-- | nix/files/.packignore | 7 | ||||
| -rw-r--r-- | nix/files/instance.cfg | 22 | ||||
| -rw-r--r-- | nix/files/mmc-pack.json | 51 |
8 files changed, 158 insertions, 0 deletions
@@ -3,3 +3,7 @@ # Exclude exported Modrinth modpacks *.mrpack + +# Exclude nix files +result +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..430df0b --- /dev/null +++ b/flake.lock @@ -0,0 +1,26 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..74ffdfb --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "getchoo's modpack"; + + inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; + + outputs = { + self, + nixpkgs, + }: let + version = self.lastModifiedDate; + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = nixpkgs.lib.genAttrs systems; + nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); + in { + packages = forAllSystems (s: let + pkgs = nixpkgsFor.${s}; + in { + getchoo-modpack = pkgs.callPackage ./nix {inherit version;}; + }); + + devShells = forAllSystems (s: let + pkgs = nixpkgsFor.${s}; + inherit (pkgs) mkShell; + in { + default = mkShell { + packages = with pkgs; [ + packwiz + p7zip + ]; + }; + }); + }; +} diff --git a/nix/default.nix b/nix/default.nix new file mode 100644 index 0000000..bd61190 --- /dev/null +++ b/nix/default.nix @@ -0,0 +1,9 @@ +{ + runCommand, + zip, + ... +}: +runCommand "getchoo-modpack" {} '' + mkdir -p "$out" + ${zip}/bin/zip "$out"/getchoo-modpack.zip ${./files}/{*,.*} +'' diff --git a/nix/files/.minecraft/packwiz-installer-bootstrap.jar b/nix/files/.minecraft/packwiz-installer-bootstrap.jar Binary files differnew file mode 100644 index 0000000..84b934c --- /dev/null +++ b/nix/files/.minecraft/packwiz-installer-bootstrap.jar diff --git a/nix/files/.packignore b/nix/files/.packignore new file mode 100644 index 0000000..448001c --- /dev/null +++ b/nix/files/.packignore @@ -0,0 +1,7 @@ +.minecraft/coremods +.minecraft/mods +.minecraft/resourcepacks +.minecraft/saves +.minecraft/screenshots +.minecraft/shaderpacks +.minecraft/texturepacks
\ No newline at end of file diff --git a/nix/files/instance.cfg b/nix/files/instance.cfg new file mode 100644 index 0000000..9e1afb7 --- /dev/null +++ b/nix/files/instance.cfg @@ -0,0 +1,22 @@ +InstanceType=OneSix +JoinServerOnLaunch=false +JvmArgs=-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseNUMA -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=400M -XX:NonNMethodCodeHeapSize=12M -XX:ProfiledCodeHeapSize=194M -XX:NonProfiledCodeHeapSize=194M -XX:-DontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+UseVectorCmov -XX:+PerfDisableSharedMem -XX:+UseFastUnorderedTimeStamps -XX:+UseCriticalJavaThreadPriority -XX:ThreadPriorityPolicy=1 -XX:AllocatePrefetchStyle=3 -XX:+UseShenandoahGC -XX:ShenandoahGCMode=iu -XX:ShenandoahGuaranteedGCInterval=1000000 -XX:AllocatePrefetchStyle=1 +MaxMemAlloc=4096 +MinMemAlloc=4096 +OverrideCommands=true +OverrideConsole=false +OverrideGameTime=false +OverrideJavaArgs=true +OverrideJavaLocation=false +OverrideMemory=true +OverrideMiscellaneous=false +OverrideNativeWorkarounds=false +OverridePerformance=false +OverrideWindow=false +PermGen=128 +PostExitCommand= +PreLaunchCommand="$INST_JAVA" -jar packwiz-installer-bootstrap.jar https://raw.githubusercontent.com/getchoo/modpack/main/pack.toml +WrapperCommand= +iconKey=default +name=getchoo-modpack +notes= diff --git a/nix/files/mmc-pack.json b/nix/files/mmc-pack.json new file mode 100644 index 0000000..624eee3 --- /dev/null +++ b/nix/files/mmc-pack.json @@ -0,0 +1,51 @@ +{ + "components": [ + { + "cachedName": "LWJGL 3", + "cachedVersion": "3.3.1", + "cachedVolatile": true, + "dependencyOnly": true, + "uid": "org.lwjgl3", + "version": "3.3.1" + }, + { + "cachedName": "Minecraft", + "cachedRequires": [ + { + "suggests": "3.3.1", + "uid": "org.lwjgl3" + } + ], + "cachedVersion": "1.19.2", + "important": true, + "uid": "net.minecraft", + "version": "1.19.2" + }, + { + "cachedName": "Intermediary Mappings", + "cachedRequires": [ + { + "equals": "1.19.2", + "uid": "net.minecraft" + } + ], + "cachedVersion": "1.19.2", + "cachedVolatile": true, + "dependencyOnly": true, + "uid": "net.fabricmc.intermediary", + "version": "1.19.2" + }, + { + "cachedName": "Quilt Loader", + "cachedRequires": [ + { + "uid": "net.fabricmc.intermediary" + } + ], + "cachedVersion": "0.17.8", + "uid": "org.quiltmc.quilt-loader", + "version": "0.17.8" + } + ], + "formatVersion": 1 +} |
