diff --git a/README.md b/README.md index dc41b27..c4319ce 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ The repository includes a unit template at [`deploy/lg-smtv-mcp.service`](deploy sudoedit /etc/systemd/system/lg-smtv-mcp.service ``` -3. Check where Nix is installed with `command -v nix`. System services do not inherit an interactive shell's profile, so edit the unit's `PATH` assignment to include the directory containing `nix` and the standard system binary directories. +3. Check where Nix is installed with `command -v nix`. Replace `` in the unit's `PATH` with the directory containing that `nix` executable, keeping the standard system binary directories in the value. The unit starts `/usr/bin/env` by its absolute path; `env` then finds `nix` using the service's configured `PATH`. 4. Reload systemd and start the service: ```bash diff --git a/deploy/lg-smtv-mcp.service b/deploy/lg-smtv-mcp.service index 2f1ffe1..1c165b1 100644 --- a/deploy/lg-smtv-mcp.service +++ b/deploy/lg-smtv-mcp.service @@ -8,8 +8,8 @@ Type=simple User= WorkingDirectory= EnvironmentFile=/.env -Environment="PATH=/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin" -ExecStart=nix develop --command python -m lg_smtv_mcp serve +Environment="PATH=:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +ExecStart=/usr/bin/env nix develop --command python -m lg_smtv_mcp serve Restart=on-failure RestartSec=5s