From dd60d301bfaec3082fbd0bf02d73d6c6258b8710 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 19 Dec 2024 11:34:29 +0000 Subject: [PATCH] Add mount OneDrive script --- system/home/scripts/default.nix | 1 + system/home/scripts/shell/mount-onedrive.sh | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 system/home/scripts/shell/mount-onedrive.sh diff --git a/system/home/scripts/default.nix b/system/home/scripts/default.nix index e860aa6a..16239ee7 100644 --- a/system/home/scripts/default.nix +++ b/system/home/scripts/default.nix @@ -7,5 +7,6 @@ (pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh)) (pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh)) (pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.sh)) + (pkgs.writeShellScriptBin "mount-onedrive" (builtins.readFile ./shell/mount-onedrive.sh)) ]; } diff --git a/system/home/scripts/shell/mount-onedrive.sh b/system/home/scripts/shell/mount-onedrive.sh new file mode 100644 index 00000000..1873aa5f --- /dev/null +++ b/system/home/scripts/shell/mount-onedrive.sh @@ -0,0 +1,3 @@ +ONEDRIVE="$HOME/OneDrive" +[ -d "$ONEDRIVE" ] || mkdir -p "$ONEDRIVE" +[ -z "$(ls -A "$ONEDRIVE")" ] && rclone --vfs-cache-mode writes mount --daemon OneDrive: "$ONEDRIVE"