diff --git a/hosts/mups/configuration.nix b/hosts/mups/configuration.nix index cec0d1a..7d735b6 100644 --- a/hosts/mups/configuration.nix +++ b/hosts/mups/configuration.nix @@ -20,7 +20,11 @@ in { mods.theme.scheme = "woodland"; mods.theme.wallpaper = ./wallpaper.png; - # mods.server.astral.enable = true; + mods.tailscale.enable = true; + + mods.unfree.minecraft.enable = true; + mods.server.astral.enable = true; + mods.server.astral.memory = "2G"; # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; diff --git a/hosts/mups/hardware-configuration.nix b/hosts/mups/hardware-configuration.nix index 6b37625..b66db4f 100644 --- a/hosts/mups/hardware-configuration.nix +++ b/hosts/mups/hardware-configuration.nix @@ -20,9 +20,12 @@ in { fsType = "ext4"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; } - ]; + swapDevices = [{ + device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; + } { + device = "/var/lib/swapfile"; + size = 2*1024; + }]; networking.useDHCP = lib.mkForce false; networking.domain = ""; diff --git a/modules/nixos/server/gaming/astral.nix b/modules/nixos/server/gaming/astral.nix index 9cb2d05..20132c3 100644 --- a/modules/nixos/server/gaming/astral.nix +++ b/modules/nixos/server/gaming/astral.nix @@ -4,7 +4,7 @@ let # version = "main"; url = "https://github.com/nix-astral/create-astral/raw/main/pack.toml"; packHash = "sha256-QcUg4PRxgGdQIB5d+XnJCmhh6+r/zDtWRFSTkSOR1ik="; - manifestHash = "sha256:0kcwbj2f9h30v8kwxhaxzzs2gi3bydzmjgxb2ysf8jv1av1l21n3"; + manifestHash = "sha256:16pjv73nv7a5fy6rvzgg88228niirnwd0ip7mw5dmzd7q1b0xqsr"; }; mcVersion = modpack.manifest.versions.minecraft; fabricVersion = modpack.manifest.versions.fabric; @@ -16,12 +16,19 @@ in { default = false; description = "enables minecraft create astral server"; }; + memory = lib.mkOption { + default = "2G"; + description = "server detitated wam"; + }; }; config = lib.mkIf config.mods.server.astral.enable { services.minecraft-servers.servers.astral = { enable = true; - jvmOpts = (import ./aikar-flags.nix) "4G"; + serverProperties = { + online-mode = false; + }; + jvmOpts = (import ./aikar-flags.nix) config.mods.server.astral.memory; package = pkgs.fabricServers.${serverVersion}.override { loaderVersion = fabricVersion; }; diff --git a/modules/nixos/unfree/minecraft.nix b/modules/nixos/unfree/minecraft.nix index 9805d94..727703a 100644 --- a/modules/nixos/unfree/minecraft.nix +++ b/modules/nixos/unfree/minecraft.nix @@ -21,9 +21,11 @@ inputs.nix-minecraft.overlay ]; - environment.systemPackages = with pkgs; [ - prismlauncher - ]; + environment.systemPackages = with pkgs; + if config.mods.xorg.enable then + [ prismlauncher ] + else + []; services.minecraft-servers = { enable = true;