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"