diff --git a/flake.nix b/flake.nix index c1ade8f..89bb234 100644 --- a/flake.nix +++ b/flake.nix @@ -12,6 +12,7 @@ url = "path:./mac-brcm-fw"; flake = false; }; + mms.url = "github:mkaito/nixos-modded-minecraft-servers"; }; outputs = { self, nixpkgs, home-manager, nixos-hardware, mac-brcm-fw, ... }: { diff --git a/potatobook-g/configuration.nix b/potatobook-g/configuration.nix index f1ef505..05548dc 100644 --- a/potatobook-g/configuration.nix +++ b/potatobook-g/configuration.nix @@ -1,10 +1,11 @@ -{ config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { imports = [ # ./t2.nix # "${builtins.fetchGit { url = "https://github.com/kekrby/nixos-hardware.git"; }}/apple/t2" ./hardware-configuration.nix ../common.nix + inputs.mms.module ]; # boot.supportedFilesystems = pkgs.lib.mkForce [ "ext4" "btrfs" "squashfs" ]; @@ -98,6 +99,27 @@ # networking.firewall.allowedTCPPorts = [ 4713 ]; systemd.services."NetworkManager-wait-online".enable = false; + services.modded-minecraft-servers = { + # This is mandatory, sorry. + eula = true; + + # The name will be used for the state folder and system user. + # In this case, the folder is `/var/lib/mc-e2es` + # and the user `mc-e2es`. + instances = { + standard-server = { + enable = true; + jvmMaxAllocation = "7G"; + jvmInitialAllocation = "2G"; + serverConfig = { + # Port must be unique + server-port = 8080; + motd = "Hello world"; + }; + }; + }; + }; + # i rly should put that important big comment back here system.stateVersion = "22.11"; # Did you read the comment?