icloud backup with kdrive

This commit is contained in:
2026-06-18 19:47:29 +02:00
parent e2b7fd8a64
commit 876ec4ce21
2 changed files with 20 additions and 6 deletions
+13
View File
@@ -53,6 +53,19 @@
monitor = [ monitor = [
", highres@highrr, auto, 0.75" ", highres@highrr, auto, 0.75"
]; ];
exec-once = [
"if [ -e \"/home/tomasr/icloudSync.sh\" ]; then /home/tomasr/icloudSync.sh; else notify-send \"icloudSync.sh doesn't exist\" \"See ~/nixos/modules/applications/hyprland.nix for more information\"; fi"
# my icloud account uses an email that I don't want to make public. So the script isnt pushed to github. The script looks like:
/*
#!/etc/profiles/per-user/tomasr/bin/zsh
if ! icloudpd --auth-only --username tomas.rivera_2009@icloud.com --dry-run; then
notify-send "icloudpd is not logged in" "Please run icloudpd icloudpd --username my@email.address --password my_password --auth-only"
exit 1
fi
icloudpd --directory ~/hdd/kdrive/Photo/IPhone/icloudpd-backup --username tomas.rivera_2009@icloud.com --watch-with-interval 3600 --no-progress-bar
*/
];
}; };
}; };
flake.homeModules.hyprland = {pkgs-unstable, ...}: let flake.homeModules.hyprland = {pkgs-unstable, ...}: let
+7 -6
View File
@@ -11,11 +11,12 @@
enable = true; enable = true;
}; };
}; };
flake.nixosModules.kdrive-desktop = {pkgs, ...}: { flake.nixosModules.kdrive-desktop = {pkgs-unstable, ...}: {
environment.systemPackages = [ environment.systemPackages = with pkgs-unstable; [
pkgs.rclone rclone
self.packages.${pkgs.system}.custom-checkKdrive icloudpd
self.packages.${pkgs.system}.custom-synckdrive-desktop self.packages.${pkgs-unstable.system}.custom-checkKdrive
self.packages.${pkgs-unstable.system}.custom-synckdrive-desktop
]; ];
# removes rclone error # removes rclone error
programs.fuse = { programs.fuse = {
@@ -24,7 +25,7 @@
}; };
systemd.user.services.kdrive-sync = { systemd.user.services.kdrive-sync = {
serviceConfig = { serviceConfig = {
ExecStart = "${self.packages.${pkgs.system}.custom-synckdrive-desktop}/bin/custom-synckdrive"; ExecStart = "${self.packages.${pkgs-unstable.system}.custom-synckdrive-desktop}/bin/custom-synckdrive";
Nice = 19; # lowest CPU scheduling priority Nice = 19; # lowest CPU scheduling priority
IOSchedulingClass = "idle"; IOSchedulingClass = "idle";