aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dot_config/environment.d/10-nix-profile-path.conf
blob: 61d640287efbc0a8cf6a9c693b16805356fb38fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Prepend the Nix home-profile (and ~/.local/bin) to the systemd *user*
# manager's environment PATH, so it is inherited by every service process.
#
# Scope of this file: it fixes PATH for *child-process* lookups made BY the
# services — e.g. wl-paste spawning `cliphist store`, swayidle running
# `swaymsg`/`playerctl`, and helper scripts (display-watcher.sh,
# on-battery-suspend) that call nix tools by bare name. The systemd user
# manager does NOT source ~/.zprofile, so without this its PATH is only
# /usr/local/bin:/usr/bin:/bin and those bare-name lookups fail.
#
# It does NOT fix systemd's own ExecStart= binary resolution: systemd's
# --user manager does not resolve a bare ExecStart name against this
# (imported/environment.d) PATH, so those would still fail 203/EXEC. For
# that reason the units under dot_config/systemd/user/ invoke their main
# binary by absolute path (%h/.nix-profile/bin/<name>); this file only
# covers the secondary PATH lookups those binaries/scripts perform.
#
# Note: environment.d is only re-read on a fresh user manager (login/boot)
# or after `systemctl --user daemon-reexec`; it is not picked up mid-session.
PATH=${HOME}/.nix-profile/bin:${HOME}/.local/bin:${PATH}