From 86fc60b46c9b3a74c52579836682a2cddb388a00 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Thu, 12 Mar 2026 09:12:45 -0400 Subject: [PATCH] opencode-web: add PATH environment for systemd service Systemd user services don't inherit shell environment. Add PATH with essential tools (git, coreutils, gnugrep, gnused, findutils) so opencode can run basic commands. --- modules/home/opencode/web.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/home/opencode/web.nix b/modules/home/opencode/web.nix index e7bbcb6..33a802a 100644 --- a/modules/home/opencode/web.nix +++ b/modules/home/opencode/web.nix @@ -1,9 +1,21 @@ { config, lib, pkgs, ... }: +let + pathPackages = [ + pkgs.git + pkgs.coreutils + pkgs.gnugrep + pkgs.gnused + pkgs.findutils + ]; +in { programs.opencode.web = { enable = true; # Bind to Tailscale IP only extraArgs = [ "--hostname" "100.122.32.106" "--port" "4096" ]; }; + systemd.user.services.opencode-web.Service = { + Environment = [ "PATH=${lib.makeBinPath pathPackages}" ]; + }; }