diff --git a/configure.d/10-core.sh b/configure.d/10-core.sh index d1b4590..11a7c6b 100755 --- a/configure.d/10-core.sh +++ b/configure.d/10-core.sh @@ -126,6 +126,9 @@ setup_superpanel() { setup_tailscale() { # --reset and --force-reauth move the machine from any other tailnet; # --operator lets you, and the Tailscale GNOME extension, use it without sudo + if ! systemctl is-active -q tailscaled; then + sudo systemctl enable --now tailscaled || return 1 + fi echo "Open the link below to sign in to your Core's Tailscale network." sudo tailscale up --reset --force-reauth --login-server "https://headscale.$CORE_DOMAIN" \ --accept-routes --operator="$USER" || return 1 @@ -262,9 +265,10 @@ EOF mkdir -p "$(dirname "$bookmarks")" grep -qs "^file://$MOUNT " "$bookmarks" || echo "file://$MOUNT $CORE_DOMAIN" >> "$bookmarks" - # sg picks up the network group now, without logging out and in again + # A new session through sudo picks up the network group now, without + # logging out and in again (Arch has no sg) if ! mountpoint -q "$MOUNT"; then - sg network -c "mount $MOUNT" || return 1 + sudo -u "$USER" mount "$MOUNT" || return 1 fi echo "Your Nextcloud files are at $MOUNT (\"$CORE_DOMAIN\" in the Files sidebar)." }