diff --git a/machines/Everest/configuration.nix b/machines/Everest/configuration.nix index fdacf1b..49e1805 100755 --- a/machines/Everest/configuration.nix +++ b/machines/Everest/configuration.nix @@ -53,11 +53,4 @@ }; }; }; - - # Open ports in the firewall. - # No idea what ports 5201 and 21027 do tho - networking.firewall.allowedTCPPorts = [5201]; - networking.firewall.allowedUDPPorts = [5201 21027]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; } diff --git a/roles/common/services/syncthing.nix b/roles/common/services/syncthing.nix index e181fe7..9f191a1 100755 --- a/roles/common/services/syncthing.nix +++ b/roles/common/services/syncthing.nix @@ -62,4 +62,8 @@ in { }; }; }; + networking.firewall = { + allowedTCPPorts = [22000]; + allowedUDPPorts = [22000 21027]; + }; } diff --git a/roles/server/caddy.nix b/roles/server/caddy.nix index f7697fc..0f2edea 100644 --- a/roles/server/caddy.nix +++ b/roles/server/caddy.nix @@ -64,7 +64,8 @@ in { # ages to boot up. If I don't add a delay, caddy tries to bind to # the tailscale interface before it's ready, making it crash too much # in too little time - services.caddy.serviceConfig.RestartSec = lib.mkForce "240s"; + services.caddy.serviceConfig.RestartSec = lib.mkForce "120s"; + services.caddy.unitConfig.StartLimitBurst = lib.mkForce "infinity"; }; programs.rust-motd.settings.service_status.Caddy = "caddy"; networking.firewall.allowedTCPPorts = [443 80]; diff --git a/roles/server/default.nix b/roles/server/default.nix index 7b3787d..2ad30f6 100755 --- a/roles/server/default.nix +++ b/roles/server/default.nix @@ -14,7 +14,6 @@ ./headscale.nix ./caddy.nix ./rust_motd.nix - ./minecraft.nix ./adguard.nix ./changedetection-io.nix ]; diff --git a/roles/server/minecraft.nix b/roles/server/minecraft.nix deleted file mode 100644 index 1db04a1..0000000 --- a/roles/server/minecraft.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "minecraft-server" - ]; - - users.users.toast.extraGroups = ["minecraft"]; - - services.minecraft-servers = { - enable = true; - eula = true; - openFirewall = true; - servers = { - vrlocals = { - enable = true; - package = pkgs.fabricServers.fabric-1_20_1; - jvmOpts = "-Xmx8G"; - serverProperties = { - motd = "\\u00A7aBigChadGuys \\u00A7lPlus \\u00A7a(w/Cobblemon!) v2.8.1\\u00A7r\\n\\u00A76Have fun!"; - server-port = 25565; - level-seed = "-1450714289616987871"; - white-list = true; - spawn-protection = 0; - enable-command-block = true; - sync-chunk-writes = false; - }; - }; - }; - }; -}