mirror of
https://github.com/srid/nixos-config.git
synced 2026-05-11 17:36:07 +08:00
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.
This commit is contained in:
parent
cd4805d5dd
commit
86fc60b46c
1 changed files with 12 additions and 0 deletions
|
|
@ -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}" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue