diff --git a/flake.lock b/flake.lock index 070507c..c0f1fb7 100644 --- a/flake.lock +++ b/flake.lock @@ -185,6 +185,22 @@ } }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1668681692, + "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "locked": { "lastModified": 1696426674, "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", @@ -198,7 +214,7 @@ "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-compat_2": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1733328505, @@ -255,6 +271,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "inputs": { "systems": "systems_2" }, @@ -272,7 +303,7 @@ "type": "github" } }, - "flake-utils_2": { + "flake-utils_3": { "inputs": { "systems": "systems_3" }, @@ -290,7 +321,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_4": { "inputs": { "systems": [ "stylix", @@ -513,6 +544,63 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, + "mms": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nix": "nix", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1669478601, + "narHash": "sha256-IQcS8IPeXvSoIrQRPgtnLxAs0Pkh8wmglDAtqE4ivNo=", + "owner": "mkaito", + "repo": "nixos-modded-minecraft-servers", + "rev": "68f2066499c035fd81c9dacfea2f512d6b0b62e5", + "type": "github" + }, + "original": { + "owner": "mkaito", + "repo": "nixos-modded-minecraft-servers", + "type": "github" + } + }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": "nixpkgs", + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1669449054, + "narHash": "sha256-aCpXrNpyFH6b1NFYGj2i/HecUvz2vZ88aEyDs1Xj8yM=", + "owner": "NixOS", + "repo": "nix", + "rev": "534332c8a03b64161ec795d1deb2ba3d48f27be1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nix", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -560,7 +648,7 @@ }, "nixos-06cb-009a-fingerprint-sensor": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1734692513, @@ -578,17 +666,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734323986, - "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", + "lastModified": 1657693803, + "narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "394571358ce82dff7411395829aa6a3aad45b907", + "rev": "365e1b3a859281cf11b94f87231adeabbdd878a2", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-24.11", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-22.05-small", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-lib": { @@ -603,6 +692,22 @@ "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1741513245, @@ -625,6 +730,37 @@ "narHash": "sha256-WsD+8uodhl58jzKKcPH4jH9dLTLFWZpVmGq4W1XDVF4=", "owner": "NixOS", "repo": "nixpkgs", + "rev": "0faaf0a9bb6dedb69bfd43ac06fb27fadc476c51", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-24.11", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1736916166, + "narHash": "sha256-puPDoVKxkuNmYIGMpMQiK8bEjaACcCksolsG36gdaNQ=", + "owner": "NixOS", + "repo": "nixpkgs", "rev": "95600680c021743fd87b3e2fe13be7c290e1cac4", "type": "github" }, @@ -635,7 +771,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1721924956, "narHash": "sha256-Sb1jlyRO+N8jBXEX9Pg9Z1Qb8Bw9QyOgLDNMEpmjZ2M=", @@ -654,7 +790,7 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "nixvim": "nixvim_2" }, "locked": { @@ -674,7 +810,7 @@ "nixvim_2": { "inputs": { "devshell": "devshell", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", @@ -702,7 +838,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixvim", "nixvim", @@ -725,7 +861,7 @@ }, "other-transcode": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ] @@ -769,9 +905,10 @@ "breezex-cursor": "breezex-cursor", "cassowary": "cassowary", "home-manager": "home-manager", + "mms": "mms", "nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened", "nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "other-transcode": "other-transcode", @@ -786,8 +923,8 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_2", - "flake-utils": "flake-utils_3", + "flake-compat": "flake-compat_3", + "flake-utils": "flake-utils_4", "git-hooks": "git-hooks_2", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", diff --git a/flake.nix b/flake.nix index 2b6ea7f..0133903 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,8 @@ nixos-06cb-009a-fingerprint-sensor = { url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor"; }; + + mms.url = "github:mkaito/nixos-modded-minecraft-servers"; }; outputs = { nixpkgs, @@ -58,6 +60,7 @@ nix-doom-emacs-unstraightened, nixos-06cb-009a-fingerprint-sensor, cassowary, + mms, ... }: let system = "x86_64-linux"; @@ -91,6 +94,7 @@ ]; specialArgs = { pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; + inherit mms; }; }; nixosConfigurations.t470 = nixpkgs.lib.nixosSystem { diff --git a/void.nix b/void.nix index 9a116f4..219a0ae 100644 --- a/void.nix +++ b/void.nix @@ -1,11 +1,12 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, mms, ... }: { imports = [ ./hardware-configuration-void.nix ./common.nix + mms.module ]; networking.hostName = "void"; # Define your hostname. @@ -88,4 +89,49 @@ Requires = "external.mount"; }; }; + + # minecraft TerraFirmaGreg server + services.modded-minecraft-servers = { + eula = true; + instances.terrafirmagreg = { + enable = true; + rsyncSSHKeys = [""]; + serverConfig = { + server-port = 25565; + motd = "Welcome to logistic-bot's TerraFirmaGreg server"; + allow-flight = true; + allow-nether = false; + difficulty = 0; + enable-rcon = false; + level-type = "tfc\:overworld"; + view-distance = 24; + }; + + jvmPackage = pkgs.jdk17; + jvmMaxAllocation = "8196M"; + jvmInitialAllocation = "2048M"; + + # "Borrowed" from AllTheMods Discord + jvmOpts = builtins.concatStringsSep " " [ + "-XX:+UseG1GC" + "-XX:+ParallelRefProcEnabled" + "-XX:MaxGCPauseMillis=200" + "-XX:+UnlockExperimentalVMOptions" + "-XX:+DisableExplicitGC" + "-XX:+AlwaysPreTouch" + "-XX:G1NewSizePercent=40" + "-XX:G1MaxNewSizePercent=50" + "-XX:G1HeapRegionSize=16M" + "-XX:G1ReservePercent=15" + "-XX:G1HeapWastePercent=5" + "-XX:G1MixedGCCountTarget=4" + "-XX:InitiatingHeapOccupancyPercent=20" + "-XX:G1MixedGCLiveThresholdPercent=90" + "-XX:G1RSetUpdatingPauseTimePercent=5" + "-XX:SurvivorRatio=32" + "-XX:+PerfDisableSharedMem" + "-XX:MaxTenuringThreshold=1" + ]; + }; + }; }