diff --git a/hosts/hitsugibune/configuration.nix b/hosts/hitsugibune/configuration.nix index d7adf8b..b8ed68e 100644 --- a/hosts/hitsugibune/configuration.nix +++ b/hosts/hitsugibune/configuration.nix @@ -38,7 +38,7 @@ in { nix.settings.experimental-features = ["nix-command" "flakes"]; - networking.firewall.allowedUDPPorts = [ 24454 ]; + networking.firewall.allowedUDPPorts = [24454]; services.modded-minecraft-servers = { # This is mandatory, sorry. @@ -91,5 +91,22 @@ in { }; }; + systemd.services.mc-announcement = { + description = "Minecraft Server Announcement"; + serviceConfig = { + Type = "oneshot"; + ExecStart = ''mcrcon -H localhost -P 25566 -p "whatisloveohbabydonthurtmedonthurtmenomore" '/title @a title {"text":"This server runs on NixOS","color":"blue","bold":true}''; + }; + }; + + systemd.timers.mc-announcement = { + description = "Run Minecraft Announcement every hour"; + wantedBy = ["timers.target"]; + timerConfig = { + OnCalendar = "hourly"; # Change this as needed + Persistent = true; + }; + }; + system.stateVersion = "24.11"; } diff --git a/hosts/saberofxebec/configuration.nix b/hosts/saberofxebec/configuration.nix index 36da70d..9cb622f 100644 --- a/hosts/saberofxebec/configuration.nix +++ b/hosts/saberofxebec/configuration.nix @@ -6,9 +6,9 @@ lib, pkgs, ... -}:let +}: let serverIP = "192.168.0.201"; -in{ +in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix