diff options
| author | 2026-06-05 11:06:00 +0100 | |
|---|---|---|
| committer | 2026-06-05 11:06:00 +0100 | |
| commit | cd050f0bdfea14f031e4a671a366c77d4f62b19d (patch) | |
| tree | d205b7c9ecbc5ff347a211c96b17ae504de4ae03 /nix/host.nix | |
| parent | b159599ece4d6889f8199fb0d079548823671677 (diff) | |
| download | dotfiles-cd050f0bdfea14f031e4a671a366c77d4f62b19d.tar.gz dotfiles-cd050f0bdfea14f031e4a671a366c77d4f62b19d.tar.bz2 dotfiles-cd050f0bdfea14f031e4a671a366c77d4f62b19d.zip | |
fix(systemd): use absolute %h/.nix-profile/bin paths in user units
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/<name>
(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.
Diffstat (limited to 'nix/host.nix')
| -rw-r--r-- | nix/host.nix | 8 |
1 files changed, 6 insertions, 2 deletions
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/<name> 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 |
