Simplify daily smart report
This commit is contained in:
parent
d57966b115
commit
b31ac3cc90
5 changed files with 46 additions and 374 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue