Simplify daily smart report

This commit is contained in:
Yan Lin 2025-09-15 12:25:20 +02:00
parent d57966b115
commit b31ac3cc90
5 changed files with 46 additions and 374 deletions

View file

@ -1,7 +1,6 @@
{ config, pkgs, lib, ... }: {
imports = [
./hardware-configuration.nix
./disk-health.nix
../../../modules/wireguard.nix
../../../modules/borg-server.nix
];
@ -355,6 +354,29 @@
};
};
# Daily SMART report using the shell alias
systemd.services.daily-smart-report = {
description = "Daily SMART Health Report";
after = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
User = "root";
ExecStart = "${pkgs.zsh}/bin/zsh -c 'source /home/yanlin/.zshrc && smart-report'";
StandardOutput = "journal";
StandardError = "journal";
};
};
systemd.timers.daily-smart-report = {
description = "Daily SMART Report Timer";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "09:00:00";
Persistent = true;
RandomizedDelaySec = "10m";
};
};
# Borg backup server configuration
services.borgbackup-server = {
enable = true;