From cd050f0bdfea14f031e4a671a366c77d4f62b19d Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 5 Jun 2026 11:06:00 +0100 Subject: fix(systemd): use absolute %h/.nix-profile/bin paths in user units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous environment.d fix was insufficient: even with the nix profile on the --user manager's PATH (confirmed via `systemctl --user show-environment`), bare-name ExecStart= still fails 203/EXEC. systemd's --user manager does not resolve a bare ExecStart binary against the imported/environment.d PATH. Invoke each unit's main binary by absolute path %h/.nix-profile/bin/ (waybar, swayidle, swayrd, inhibridge, wl-paste, wob). %h expands to $HOME at unit load. Secondary lookups those binaries/scripts perform (cliphist, swaymsg, playerctl) still rely on PATH, which environment.d provides — so that file stays, with its comment corrected to reflect this split. --- nix/host.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'nix/host.nix') diff --git a/nix/host.nix b/nix/host.nix index 9b594b8..ecaf464 100644 --- a/nix/host.nix +++ b/nix/host.nix @@ -66,8 +66,12 @@ in # Pure user-session GUIs/daemons — no system unit, no D-Bus activation # file under /usr/share/dbus-1, no login-manager session entry. The # corresponding user-scope systemd units live under - # dot_config/systemd/user/ and reference these binaries by bare name - # so $PATH resolves them out of ~/.nix-profile/bin. + # dot_config/systemd/user/ and reference these binaries by an absolute + # %h/.nix-profile/bin/ path. (Bare names do NOT work: systemd's + # ExecStart binary resolution does not use the imported/environment.d + # PATH of the --user manager, so a bare name fails with 203/EXEC even + # though `systemctl --user show-environment` shows the nix profile on + # PATH. The %h specifier expands to $HOME at unit-load time.) waybar mako fuzzel -- cgit v1.3.1