From dc4594333f2277b45e7b1e618865687b2d3d77d7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 24 Mar 2026 15:09:32 +0100 Subject: [PATCH] fix(mx): fix check_root email subject and consolidate systemd attrsets The check_root service incorrectly used '/boot Disk Space Alert' as the email subject instead of '/ Disk Space Alert'. Also merged the duplicate systemd.services and systemd.timers attribute sets. Co-Authored-By: Claude Opus 4.6 (1M context) --- systems/x86_64-linux/mx/default.nix | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/systems/x86_64-linux/mx/default.nix b/systems/x86_64-linux/mx/default.nix index 3efb22c..493ee7a 100644 --- a/systems/x86_64-linux/mx/default.nix +++ b/systems/x86_64-linux/mx/default.nix @@ -118,18 +118,6 @@ }; wantedBy = [ "default.target" ]; }; - }; - - systemd.timers = { - check_boot = { - timerConfig = { - OnCalendar = "daily"; - }; - wantedBy = [ "timers.target" ]; - }; - }; - - systemd.services = { check_root = { serviceConfig = { Type = "oneshot"; @@ -140,7 +128,7 @@ THRESHOLD=85 if [ "$CURRENT" -gt "$THRESHOLD" ] ; then - ${pkgs.mailutils}/bin/mail -s '/boot Disk Space Alert' harald << EOF + ${pkgs.mailutils}/bin/mail -s '/ Disk Space Alert' harald << EOF Your root partition remaining free space is critically low. Used: $CURRENT% EOF fi @@ -152,6 +140,12 @@ }; systemd.timers = { + check_boot = { + timerConfig = { + OnCalendar = "daily"; + }; + wantedBy = [ "timers.target" ]; + }; check_root = { timerConfig = { OnCalendar = "daily";