Skip to content

fix(gateway): add NixOS system paths to systemd unit PATH#26308

Open
flooryyyy wants to merge 1 commit into
NousResearch:mainfrom
flooryyyy:fix/nixos-systemd-path
Open

fix(gateway): add NixOS system paths to systemd unit PATH#26308
flooryyyy wants to merge 1 commit into
NousResearch:mainfrom
flooryyyy:fix/nixos-systemd-path

Conversation

@flooryyyy

@flooryyyy flooryyyy commented May 15, 2026

Copy link
Copy Markdown
Contributor

gateway systemd unit PATH missing /run/current-system/sw/bin on nixos.
all system packages invisible — ffmpeg, curl, kill, grep gone.
STT dead (ffmpeg needed for ogg conversion). ExecReload=/bin/kill broken.

fix: detect nixos, prepend /run/current-system/sw paths. patch kill path too.
same treatment for user-scope and system-scope unit templates.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery area/nix Nix flake, NixOS module, container packaging labels May 15, 2026
@flooryyyy flooryyyy force-pushed the fix/nixos-systemd-path branch from 61af8aa to 7987606 Compare May 15, 2026 12:24
@flooryyyy

Copy link
Copy Markdown
Contributor Author

sorry, happened to miss a few silly changes. /usr/bin/env kill instead of /bin/kill should now also work universally. NixOS only has env binary in /usr/bin. previous fix overengineered.

should be okay now. not sure if this was the most elegant way to do it.

On NixOS, systemd units don't inherit the user's PATH, so system
packages (ffmpeg, curl, kill) are invisible. This breaks STT (ffmpeg
for ogg conversion) and ExecReload (/bin/kill doesn't exist).

- Prepend /run/current-system/sw/{bin,sbin} to PATH in both user and
  system unit templates (only when /etc/NIXOS exists)
- Add ~/.nix-profile/{bin,sbin} to user-local path candidates
- Use /usr/bin/env kill in ExecReload instead of hardcoded /bin/kill
@flooryyyy flooryyyy force-pushed the fix/nixos-systemd-path branch from 6a4449c to ae8ff93 Compare May 15, 2026 12:32
NishantEC

This comment was marked as outdated.

@flooryyyy

Copy link
Copy Markdown
Contributor Author

this is a low-risk change but anyone encountering this will need to ask their agent to fix it or find the issue themselves. is there any reason for not merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/nix Nix flake, NixOS module, container packaging comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants