summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-23 03:48:01 -0600
committerCraig Jennings <c@cjennings.net>2026-01-23 03:48:01 -0600
commitbe69bc545631012bdc54151f02b7477c15db9dc5 (patch)
tree031823721ef540acb734f490b4d0ab40c74f88c9
parent778fac1178ca38a6b3daa9253095fbbd84e9c5cc (diff)
fix(archsetup): enable syncthing user service via symlink
systemctl --user requires an active D-Bus user session bus, which doesn't exist during installation. Create the enable symlink directly in ~/.config/systemd/user/default.target.wants/ instead.
-rwxr-xr-xarchsetup8
1 files changed, 7 insertions, 1 deletions
diff --git a/archsetup b/archsetup
index c116e3f..401e6d5 100755
--- a/archsetup
+++ b/archsetup
@@ -1349,7 +1349,13 @@ desktop_environment() {
pacman_install syncthing
# Use user service (not system service) to avoid lock file conflicts if both get enabled
loginctl enable-linger "$username"
- sudo -u "$username" systemctl --user enable syncthing.service
+ # Enable syncthing user service by creating symlink directly
+ # (systemctl --user fails during install - no user session bus available)
+ action="enabling syncthing user service" && display "task" "$action"
+ user_systemd_dir="/home/$username/.config/systemd/user/default.target.wants"
+ mkdir -p "$user_systemd_dir"
+ ln -sf /usr/lib/systemd/user/syncthing.service "$user_systemd_dir/syncthing.service"
+ chown -R "$username:$username" "/home/$username/.config/systemd"
# Desktop Environment Utilities