From 1d47a987bb994c9a085b5589127a0160670f21d3 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Sun, 23 Oct 2022 15:29:27 +0200 Subject: [PATCH] serverrr --- flake.nix | 1 + potatobook-g/configuration.nix | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) 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?