diff --git a/home/packages.nix b/home/packages.nix index d881fe0..11e1a0a 100644 --- a/home/packages.nix +++ b/home/packages.nix @@ -17,6 +17,8 @@ with pkgs; [ (callPackage ./packages/custom/update-ubuntu-system { }) (callPackage ./packages/custom/push-etckeeper { }) (callPackage ./packages/custom/backup { }) + (callPackage ./packages/custom/nextcloud-sync/from-local.nix { }) + (callPackage ./packages/custom/nextcloud-sync/from-remote.nix { }) (callPackage ./packages/custom/build-phpactor { }) i3blocks st diff --git a/home/packages/custom/nextcloud-sync/from-local.nix b/home/packages/custom/nextcloud-sync/from-local.nix new file mode 100644 index 0000000..da04bda --- /dev/null +++ b/home/packages/custom/nextcloud-sync/from-local.nix @@ -0,0 +1,17 @@ +{ + writeShellApplication, + rclone +}: + +writeShellApplication { + name = "custom-nextcloud-sync-from-local"; + + runtimeInputs = [ + rclone + ]; + + text = '' + rclone sync -v --progress ~/Documents/Nextcloud Nextcloud-Private:Documents + rclone sync -v --progress ~/Documents/NextcloudCodappix/Documents/ Nextcloud-Codappix:Documents + ''; +} diff --git a/home/packages/custom/nextcloud-sync/from-remote.nix b/home/packages/custom/nextcloud-sync/from-remote.nix new file mode 100644 index 0000000..44be9d4 --- /dev/null +++ b/home/packages/custom/nextcloud-sync/from-remote.nix @@ -0,0 +1,17 @@ +{ + writeShellApplication, + rclone +}: + +writeShellApplication { + name = "custom-nextcloud-sync-from-remote"; + + runtimeInputs = [ + rclone + ]; + + text = '' + rclone sync -v --progress Nextcloud-Private:Documents ~/Documents/Nextcloud + rclone sync -v --progress Nextcloud-Codappix:Documents ~/Documents/NextcloudCodappix/Documents/ + ''; +}