diff --git a/system/desktop.nix b/system/desktop.nix index 7bc07af..5953af9 100644 --- a/system/desktop.nix +++ b/system/desktop.nix @@ -38,9 +38,6 @@ ./services/udev.nix ./services/sunshine.nix ./services/mpd.nix - - # School VPN - ./services/globalprotect.nix ]; # Set hostname diff --git a/system/desktop/school.nix b/system/desktop/school.nix index 2c2effd..3a0993b 100644 --- a/system/desktop/school.nix +++ b/system/desktop/school.nix @@ -3,9 +3,9 @@ environment.systemPackages = with pkgs; [ remmina freerdp - globalprotect-openconnect python3 zoom-us + globalprotect-openconnect ]; # Enable Globalprotect VPN diff --git a/system/desktop/wireguard.nix b/system/desktop/wireguard.nix index 639a33f..9a08f57 100644 --- a/system/desktop/wireguard.nix +++ b/system/desktop/wireguard.nix @@ -12,7 +12,7 @@ { # 0.0.0.0 makes wg act like a traditional VPN publicKey = outputs.secrets.wgServerPub; allowedIPs = [ "0.0.0.0/0" ]; - endpoint = "mc.${outputs.secrets.jimDomain}:51820"; + endpoint = "sv.${outputs.secrets.jimDomain}:51820"; persistentKeepalive = 25; } ]; diff --git a/system/server/minecraft/common.nix b/system/server/minecraft/common.nix index 0c41b5b..c8c1814 100644 --- a/system/server/minecraft/common.nix +++ b/system/server/minecraft/common.nix @@ -27,8 +27,8 @@ # Common plugins paperSymlinks = { "plugins/Backuper.jar" = builtins.fetchurl { - url = "https://cdn.modrinth.com/data/7cMAqMND/versions/nkcNIvUw/Backuper-3.0.1.jar"; - sha256 = "081hvs7khd9s8598i59ai8n0idp85rgc89m9hpfajwym9rmy7il4"; + url = "https://cdn.modrinth.com/data/7cMAqMND/versions/DqtME18V/Backuper-3.1.0.jar"; + sha256 = "0lml9mz8ky2g9iy5xb61s15biwlbxfi5w4mfamxfin2kl4w6ggq9"; }; "plugins/BungeeGuard.jar" = builtins.fetchurl { url = "https://github.com/lucko/BungeeGuard/releases/download/v1.3.3/BungeeGuard.jar"; @@ -61,7 +61,7 @@ }; # Config files - configSymlinks = { + configFiles = { "plugins/Essentials/config.yml" = ./essentialsconfig.yml; "plugins/voicechat/voicechat-server.properties" = ./vcserver.properties; }; diff --git a/system/server/minecraft/default.nix b/system/server/minecraft/default.nix index 7dbb457..5705efd 100644 --- a/system/server/minecraft/default.nix +++ b/system/server/minecraft/default.nix @@ -6,7 +6,7 @@ ./servers/johnside.nix ./servers/blockworld.nix ./servers/uberbeta.nix - #./servers/freaktards.nix + ./servers/roguecraft.nix ]; nixpkgs.overlays = [ inputs.minecraft.overlay ]; diff --git a/system/server/minecraft/servers/blockworld.nix b/system/server/minecraft/servers/blockworld.nix index bd27829..7f3e96d 100644 --- a/system/server/minecraft/servers/blockworld.nix +++ b/system/server/minecraft/servers/blockworld.nix @@ -9,9 +9,10 @@ in { serverProperties = common.serverProperties // { difficulty = 2; server-port = 30012; - motd = "§fArchival §l§n§cBloxelcom §r§fMinecraft server."; + motd = "\\u00A7fArchival \\u00A7l\\u00A7n\\u00A7cBloxelcom \\u00A7r\\u00A7fMinecraft server."; }; whitelist = common.whitelist; - symlinks = common.paperSymlinks // common.configSymlinks; + symlinks = common.paperSymlinks; + files = common.configFiles; }; } diff --git a/system/server/minecraft/servers/dewdemolisher.nix b/system/server/minecraft/servers/dewdemolisher.nix index 740b539..2c97575 100644 --- a/system/server/minecraft/servers/dewdemolisher.nix +++ b/system/server/minecraft/servers/dewdemolisher.nix @@ -4,13 +4,14 @@ in { services.minecraft-servers.servers.dewdemolisher = { enable = true; package = pkgs.paperServers.paper-1_21_1; - jvmOpts = "-Xmx3072M"; + jvmOpts = "-Xmx2000M"; serverProperties = common.serverProperties // { difficulty = 2; server-port = 30010; - motd = "§l§aDew Demolisher is here."; + motd = "\\u00A7l\\u00A7aDew Demolisher is here."; }; whitelist = common.whitelist; - symlinks = common.paperSymlinks // common.configSymlinks; + symlinks = common.paperSymlinks; + files = common.configFiles; }; } diff --git a/system/server/minecraft/servers/johnside.nix b/system/server/minecraft/servers/johnside.nix index 770898c..6baea7d 100644 --- a/system/server/minecraft/servers/johnside.nix +++ b/system/server/minecraft/servers/johnside.nix @@ -5,14 +5,14 @@ in { minecraft-servers.servers.johnside = { enable = true; package = pkgs.paperServers.paper-1_20_6; - jvmOpts = "-Xmx3072M"; + jvmOpts = "-Xmx2500M"; serverProperties = common.serverProperties // { difficulty = 2; server-port = 30009; - motd = "§l§9Johnside SMP§r §l§fworld for §4John lovers only."; + motd = "\\u00A7l\\u00A79Johnside SMP\\u00A7r \\u00A7l\\u00A7fworld for \\u00A74John lovers only."; }; whitelist = common.whitelist; - symlinks = common.paperSymlinks // common.configSymlinks // { + symlinks = common.paperSymlinks // { "plugins/BlueMap.jar" = builtins.fetchurl { url = "https://cdn.modrinth.com/data/swbUV1cr/versions/TL5ElRWX/BlueMap-5.3-spigot.jar"; sha256 = "08ls3wk0333vjg49kcmri884pcgm2xk9xdhwcxyffbh4ra0xrlbw"; @@ -38,6 +38,7 @@ in { sha256 = "0mbp73xclr7f5m2lbdfz6is1j8vvyv1qwpl28sm089zrpm73qn6w"; }; }; + files = common.configFiles; }; # BlueMap webhost diff --git a/system/server/minecraft/servers/roguecraft.nix b/system/server/minecraft/servers/roguecraft.nix new file mode 100644 index 0000000..64b66b8 --- /dev/null +++ b/system/server/minecraft/servers/roguecraft.nix @@ -0,0 +1,35 @@ +{pkgs, outputs, ...}: let + common = import ../common.nix { inherit pkgs; }; +in { + services = { + minecraft-servers.servers.roguecraft = { + enable = true; + package = pkgs.paperServers.paper-1_21_1; + jvmOpts = "-Xmx3000M"; + serverProperties = common.serverProperties // { + difficulty = 3; + server-port = 30014; + motd = "\\u00A7l\\u00A7bJimbo's \\u00A7cRoguecraft \\u00A7bserver."; + require-resource-pack = true; + resource-pack = "https://${outputs.secrets.jimDomain}/roguecraftresourcepackredir"; + resource-pack-sha1 = "b540c0562aba90c3ead2356bb9cb74fcf0db36b3"; + }; + whitelist = common.whitelist; + symlinks = common.paperSymlinks; + files = common.configFiles // { + "world/datapacks/roguecraft.zip" = builtins.fetchurl { + url = "https://${outputs.secrets.jimDomain}/roguecraftdatapackredir"; + sha256 = "04zrkvzvi1i898al45fh9j3k635sf9qhwca7phbv4ynkfl8bz3q3"; + }; + }; + }; + nginx.virtualHosts."${outputs.secrets.jimDomain}".locations = { + "/roguecraftdatapackredir" = { + return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/Rme4c23R/Roguecraft%201.2.6%20-%20Data%20Pack.zip"; + }; + "/roguecraftresourcepackredir" = { + return = "301 https://cdn.modrinth.com/data/HtKjVijx/versions/C6bITJnq/Roguecraft%201.2.5.4%20-%20Resource%20Pack.zip"; + }; + }; + }; +} diff --git a/system/services/globalprotect.nix b/system/services/globalprotect.nix deleted file mode 100644 index c6a254a..0000000 --- a/system/services/globalprotect.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.globalprotect.enable = true; -}