From e72b25df04c6d90376c52e13e1e155c12a2ba98a Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Thu, 25 Sep 2025 08:58:18 +0200 Subject: [PATCH] Add alias for timer services --- README.md | 7 +++++++ modules/container-updater.nix | 5 +++++ modules/smart-report.nix | 5 +++++ 3 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 9c2d7c8..44a154b 100644 --- a/README.md +++ b/README.md @@ -140,6 +140,13 @@ docker exec -it bash systemctl list-timers ``` +### Manual Timer Service Execution +- `dl-subs-yt` - Check YouTube subscriptions and download new videos +- `smart-report-now` - Run SMART disk health report manually +- `container-update-now` - Update container images manually +- `borg-backup-now` - Run backup manually +- `borg-check-now` - Run backup integrity check manually + ## Notes - Borg backups need passphrase at `/etc/borg-passphrase` diff --git a/modules/container-updater.nix b/modules/container-updater.nix index 862822d..91b045e 100644 --- a/modules/container-updater.nix +++ b/modules/container-updater.nix @@ -55,6 +55,11 @@ in chmod +x /home/yanlin/.config/nix/scripts/container-update.sh chmod +x /home/yanlin/.config/nix/scripts/gotify-notify.sh ''; + + # Shell alias for manual execution + environment.shellAliases = { + container-update-now = "sudo systemctl start container-updater.service"; + }; # Systemd service for container updates systemd.services.container-updater = { diff --git a/modules/smart-report.nix b/modules/smart-report.nix index ca55d95..bddbb00 100644 --- a/modules/smart-report.nix +++ b/modules/smart-report.nix @@ -63,6 +63,11 @@ in { # Install the wrapper script package environment.systemPackages = [ smartReportScript ]; + # Shell alias for manual execution + environment.shellAliases = { + smart-report-now = "sudo systemctl start daily-smart-report.service"; + }; + # Configure systemd service if enabled systemd.services.daily-smart-report = mkIf cfg.enableSystemdService { description = "Daily SMART Health Report";