From ac916d8305fb8d64ab51a89c264caa4d919d457e Mon Sep 17 00:00:00 2001 From: Nettika Date: Wed, 18 Dec 2024 22:04:49 -0800 Subject: [PATCH] Add reboot service to monolith --- hosts/monolith/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hosts/monolith/default.nix b/hosts/monolith/default.nix index 74a58eb..be5a54c 100755 --- a/hosts/monolith/default.nix +++ b/hosts/monolith/default.nix @@ -66,6 +66,24 @@ }; }; + systemd = { + services.reboot = { + description = "Reboot the system"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.systemd}/bin/systemctl reboot"; + }; + }; + timers.reboot = { + description = "Reboot the system every two hours"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "6h"; + Persistent = true; + }; + }; + }; + promptEmoji = "🏰"; time.timeZone = "America/Los_Angeles";