feat(home): add systemd user timer for corazoncp-drive sync

- Add systemd.user.services.corazoncp-drive-sync running drive/sync-drive.sh with explicit PATH (rclone, git, openssh, libnotify, util-linux, findutils, coreutils)
- Add systemd.user.timers.corazoncp-drive-sync polling every 15m (Persistent=true) so syncs survive reboots and catch up after sleep
This commit is contained in:
kiskaadee committed 2026-11-26 21:41:53 -05:00
1 parent 2261e4b792
commit 6163eb0396
1 file changed
+30
+30
View File
@@ -227,4 +227,34 @@ in
sops # Mozilla SOPS CLI sops # Mozilla SOPS CLI
age # File encryption tool age # File encryption tool
]; ];
# Background two-way sync for corazoncp shared Google Drive repository
systemd.user.services.corazoncp-drive-sync = {
Unit = {
Description = "Two-way sync between corazoncp/drive and Google Drive";
After = [ "network-online.target" "graphical-session.target" ];
Wants = [ "network-online.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.bash}/bin/bash /home/kiskaadee/Projects/active/corazoncp/drive/sync-drive.sh";
Environment = [
"PATH=${pkgs.lib.makeBinPath [ pkgs.rclone pkgs.git pkgs.openssh pkgs.libnotify pkgs.util-linux pkgs.findutils pkgs.coreutils ]}"
];
};
};
systemd.user.timers.corazoncp-drive-sync = {
Unit = {
Description = "Poll corazoncp shared Google Drive every 15 minutes";
};
Timer = {
OnBootSec = "2m";
OnUnitActiveSec = "15m";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
} }