commit 286aae9b3bff8ad046be622590e4902b949b0a0a
parent e91d12508dbbec4b1a468e9b232b146efd81ebba
Author: breadcat <breadcat@users.noreply.github.com>
Date: Thu, 31 Jul 2025 13:45:17 +0100
Systemd timers don't work without a path, apparently
Diffstat:
4 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/common/cron-duolingo-rank.nix b/common/cron-duolingo-rank.nix
@@ -1,14 +1,15 @@
{ username, ... }:
{
- systemd.timers.duolingoRank = {
+ systemd.timers.duolingo-rank = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "Sun 23:59";
Persistent = true;
};
};
- systemd.services.duolingoRank = {
+ systemd.services.duolingo-rank = {
script = "blog-duolingo-rank";
+ path = [ "/run/current-system/sw" ];
serviceConfig = {
Type = "oneshot";
User = "${username}";
diff --git a/common/restic.nix b/common/restic.nix
@@ -19,9 +19,19 @@ let
in {
environment.systemPackages = [ backup-cloud ];
+ systemd.timers.restic-backup = {
+ description = "Timer to run Restic backup";
+ wantedBy = [ "timers.target" ];
+ timerConfig = {
+ OnActiveSec = "12h";
+ Persistent = true;
+ };
+ };
+
systemd.services.restic-backup = {
description = "Backup specific directories to BorgBase";
script = "backup-cloud";
+ path = [ "/run/current-system/sw" ];
serviceConfig = {
Type = "oneshot";
User = "${username}";
@@ -29,12 +39,4 @@ in {
};
};
- systemd.timers.restic-backup = {
- description = "Timer to run Restic backup";
- wantedBy = [ "timers.target" ];
- timerConfig = {
- OnActiveSec = "12h";
- Persistent = true;
- };
- };
}
diff --git a/common/tank-log.nix b/common/tank-log.nix
@@ -56,6 +56,7 @@ in {
systemd.services.tank-log = {
script = "tank-log";
+ path = [ "/run/current-system/sw" ];
serviceConfig = {
Type = "oneshot";
User = "${username}";
diff --git a/common/tank-sort.nix b/common/tank-sort.nix
@@ -31,6 +31,7 @@ in {
systemd.services.tank-sort = {
script = "tank-sort";
+ path = [ "/run/current-system/sw" ];
serviceConfig = {
Type = "oneshot";
User = "${username}";