From 4feb77bb02b5dddf38caec1bad12965d586eb3a1 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 10 Nov 2022 18:24:02 +0100 Subject: [PATCH] Add explanation for cloud sync --- ManuSurface/ManuSurfaceSetup.md | 39 +++++++++++++++++++++++++++++++-- ManuSurface/rclone@.service | 34 ++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 ManuSurface/rclone@.service diff --git a/ManuSurface/ManuSurfaceSetup.md b/ManuSurface/ManuSurfaceSetup.md index 4f3e0291..c7af3a1a 100644 --- a/ManuSurface/ManuSurfaceSetup.md +++ b/ManuSurface/ManuSurfaceSetup.md @@ -4,8 +4,19 @@ The steps described here allow the creation of a linux system on a Surface Book - Rename host - Install Brave - Install Bitwarden - - Install snapd - - Install vscodium using snapd + - Install Xournal++ + - Install codium: + ```bash + wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \ + | gpg --dearmor \ + | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg + + echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' + | sudo tee /etc/apt/sources.list.d/vscodium.list + + sudo apt update + sudo apt install codium + ``` - Generate SSH-key - Install `linux-surface` See: @@ -63,6 +74,30 @@ The steps described here allow the creation of a linux system on a Surface Book ## Enhancement - Install `Gnome Extension Manager` - Install Extensions `Clipboard Indicator` + - Sync NextCloud + ```bash + sudo -v ; curl https://rclone.org/install.sh | sudo bash + rclone config # add remote + cp ./rclone@.service ~/.config/systemd/user/ + systemctl --user daemon-reload + systemctl --user enable rclone@nextcloud:Nextcloud + systemctl --user start rclone@nextcloud:Nextcloud + ``` + - Install `oh-my-posh` + ```bash + sudo wget https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64 -O /usr/local/bin/oh-my-posh + sudo chmod +x /usr/local/bin/oh-my-posh + echo 'eval "$(oh-my-posh init bash --config ~/Nextcloud/.omp/manuel.omp.json)"' >> ~/.bashrc + ``` + - Install `logo-ls` + ```bash + sudo wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb -O logo-ls.deb + sudo dpkg -i logo-ls.deb + { + echo "alias ls='logo-ls -D'" + echo "alias ll='logo-ls -al'" + } >> ~/.bashrc + ``` ## Post-Install - Add SSH-key to GitHub/Gitea websites diff --git a/ManuSurface/rclone@.service b/ManuSurface/rclone@.service new file mode 100644 index 00000000..d0d1463d --- /dev/null +++ b/ManuSurface/rclone@.service @@ -0,0 +1,34 @@ +# User service for Rclone mounting +# +# Place in ~/.config/systemd/user/ +# File must include the '@' (ex rclone@.service) +# As your normal user, run +# systemctl --user daemon-reload +# You can now start/enable each remote by using rclone@ +# systemctl --user enable rclone@dropbox +# systemctl --user start rclone@dropbox + +[Unit] +Description=rclone: Remote FUSE filesystem for cloud storage config %i +Documentation=man:rclone(1) +After=network-online.target +Wants=network-online.target + +[Service] +Type=notify +Environment="EXPRESSION=%i" +ExecStart= \ + bash -c ' \ + target="${EXPRESSION%%":"*}"; \ + dirname="${EXPRESSION#*":"}"; \ + mkdir -p "%h/$dirname"; \ + mkdir -p /tmp/rclone; \ + /usr/bin/rclone mount \ + --config=%h/.config/rclone/rclone.conf \ + --vfs-cache-mode full \ + --log-file /tmp/rclone/$target.log \ + $target: "%h/$dirname"' +ExecStop=bash -c '/bin/fusermount -u "%h/${EXPRESSION#*":"}"' + +[Install] +WantedBy=default.target \ No newline at end of file