From 801d9901545731f86f0fc88db2fd5aaa9963a385 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Thu, 11 Sep 2025 13:44:08 +0200 Subject: [PATCH] added systemd service for gdrive --- .gitignore | 4 +++- hypr/modules/env.conf | 4 ++-- .../gcr-ssh-agent.service | 1 + .../pipewire-pulse.service | 1 + .../default.target.wants/pipewire.service | 1 + systemd/user/gdrive-mount.service | 24 +++++++++++++++++++ .../hyprpaper.service | 1 + .../hyprpolkitagent.service | 1 + .../waybar.service | 1 + .../multi-user.target.wants/wayvnc.service | 1 + .../sockets.target.wants/gcr-ssh-agent.socket | 1 + .../pipewire-pulse.socket | 1 + .../user/sockets.target.wants/pipewire.socket | 1 + systemd/user/ssh-agent.service | 10 ++++++++ 14 files changed, 49 insertions(+), 3 deletions(-) create mode 120000 systemd/user/default.target.wants/gcr-ssh-agent.service create mode 120000 systemd/user/default.target.wants/pipewire-pulse.service create mode 120000 systemd/user/default.target.wants/pipewire.service create mode 100644 systemd/user/gdrive-mount.service create mode 120000 systemd/user/graphical-session.target.wants/hyprpaper.service create mode 120000 systemd/user/graphical-session.target.wants/hyprpolkitagent.service create mode 120000 systemd/user/graphical-session.target.wants/waybar.service create mode 120000 systemd/user/multi-user.target.wants/wayvnc.service create mode 120000 systemd/user/sockets.target.wants/gcr-ssh-agent.socket create mode 120000 systemd/user/sockets.target.wants/pipewire-pulse.socket create mode 120000 systemd/user/sockets.target.wants/pipewire.socket create mode 100644 systemd/user/ssh-agent.service diff --git a/.gitignore b/.gitignore index 50ec30a..ab55071 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ !mimeapps.list !fuzzel/ !fish/ -fish/fish_variables !packages !brave-flags.conf !chromium-flags.conf @@ -21,3 +20,6 @@ fish/fish_variables !rice-2.png !rice-3.png !btop +!wireplumber/ +!systemd/ +fish/fish_variables diff --git a/hypr/modules/env.conf b/hypr/modules/env.conf index a16fbad..82bf15f 100644 --- a/hypr/modules/env.conf +++ b/hypr/modules/env.conf @@ -8,7 +8,7 @@ env = XCURSOR_THEME,Bibata-Modern-Classic env = XDG_CURRENT_DESKTOP,Hyprland env = debug:full_cm_proto,true env = QT_QPA_PLATFORMTHEME,qt6ct -env = LIBVA_DRIVER_NAME,radeonsi -env = VDPAU_DRIVER,radeonsi +# env = LIBVA_DRIVER_NAME,radeonsi +# env = VDPAU_DRIVER,radeonsi env = MOZ_ENABLE_WAYLAND,1 env = ELECTRON_OZONE_PLATFORM_HINT,wayland diff --git a/systemd/user/default.target.wants/gcr-ssh-agent.service b/systemd/user/default.target.wants/gcr-ssh-agent.service new file mode 120000 index 0000000..fb93872 --- /dev/null +++ b/systemd/user/default.target.wants/gcr-ssh-agent.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/gcr-ssh-agent.service \ No newline at end of file diff --git a/systemd/user/default.target.wants/pipewire-pulse.service b/systemd/user/default.target.wants/pipewire-pulse.service new file mode 120000 index 0000000..f631f69 --- /dev/null +++ b/systemd/user/default.target.wants/pipewire-pulse.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/pipewire-pulse.service \ No newline at end of file diff --git a/systemd/user/default.target.wants/pipewire.service b/systemd/user/default.target.wants/pipewire.service new file mode 120000 index 0000000..47f171d --- /dev/null +++ b/systemd/user/default.target.wants/pipewire.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/pipewire.service \ No newline at end of file diff --git a/systemd/user/gdrive-mount.service b/systemd/user/gdrive-mount.service new file mode 100644 index 0000000..2d8c598 --- /dev/null +++ b/systemd/user/gdrive-mount.service @@ -0,0 +1,24 @@ +# ~/.config/systemd/user/rclone-mount.service + +[Unit] +Description=Rclone Mount for google drive +# This ensures your network is ready before it tries to mount +After=network-online.target + +[Service] +# The command to start the mount. +# Replace "my-remote:" and "/path/to/local/mount" accordingly. +# The flags below are highly recommended for a good experience. +ExecStart=rclone mount google_drive: %h/gdrive \ + --vfs-cache-mode writes \ + --log-file /tmp/rclone.log \ + --log-level INFO + +# The command to unmount gracefully. +ExecStop=fusermount -u %h/gdrive +Restart=on-failure +RestartSec=10 + +[Install] +# This tells systemd to start the service at user login. +WantedBy=default.target diff --git a/systemd/user/graphical-session.target.wants/hyprpaper.service b/systemd/user/graphical-session.target.wants/hyprpaper.service new file mode 120000 index 0000000..a5b7405 --- /dev/null +++ b/systemd/user/graphical-session.target.wants/hyprpaper.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hyprpaper.service \ No newline at end of file diff --git a/systemd/user/graphical-session.target.wants/hyprpolkitagent.service b/systemd/user/graphical-session.target.wants/hyprpolkitagent.service new file mode 120000 index 0000000..ad39210 --- /dev/null +++ b/systemd/user/graphical-session.target.wants/hyprpolkitagent.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/hyprpolkitagent.service \ No newline at end of file diff --git a/systemd/user/graphical-session.target.wants/waybar.service b/systemd/user/graphical-session.target.wants/waybar.service new file mode 120000 index 0000000..c2a0b64 --- /dev/null +++ b/systemd/user/graphical-session.target.wants/waybar.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/waybar.service \ No newline at end of file diff --git a/systemd/user/multi-user.target.wants/wayvnc.service b/systemd/user/multi-user.target.wants/wayvnc.service new file mode 120000 index 0000000..ed0755c --- /dev/null +++ b/systemd/user/multi-user.target.wants/wayvnc.service @@ -0,0 +1 @@ +/usr/lib/systemd/user/wayvnc.service \ No newline at end of file diff --git a/systemd/user/sockets.target.wants/gcr-ssh-agent.socket b/systemd/user/sockets.target.wants/gcr-ssh-agent.socket new file mode 120000 index 0000000..b1e9e61 --- /dev/null +++ b/systemd/user/sockets.target.wants/gcr-ssh-agent.socket @@ -0,0 +1 @@ +/usr/lib/systemd/user/gcr-ssh-agent.socket \ No newline at end of file diff --git a/systemd/user/sockets.target.wants/pipewire-pulse.socket b/systemd/user/sockets.target.wants/pipewire-pulse.socket new file mode 120000 index 0000000..45f6209 --- /dev/null +++ b/systemd/user/sockets.target.wants/pipewire-pulse.socket @@ -0,0 +1 @@ +/usr/lib/systemd/user/pipewire-pulse.socket \ No newline at end of file diff --git a/systemd/user/sockets.target.wants/pipewire.socket b/systemd/user/sockets.target.wants/pipewire.socket new file mode 120000 index 0000000..d871d81 --- /dev/null +++ b/systemd/user/sockets.target.wants/pipewire.socket @@ -0,0 +1 @@ +/usr/lib/systemd/user/pipewire.socket \ No newline at end of file diff --git a/systemd/user/ssh-agent.service b/systemd/user/ssh-agent.service new file mode 100644 index 0000000..87d6c04 --- /dev/null +++ b/systemd/user/ssh-agent.service @@ -0,0 +1,10 @@ +[Unit] +Description=SSH key agent + +[Service] +Type=forking +Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket +ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK + +[Install] +WantedBy=default.target