fix(mcp-gateway): use nix store binary path in systemd ExecStart

Expand $out in the heredoc so ExecStart points to the actual binary
in the nix store, not %h/.config/mcp-gateway/mcp-gateway.
This commit is contained in:
2026-05-06 20:02:24 +03:00
parent d45b4242c8
commit 87c44ba6da

View File

@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
postInstall = '' postInstall = ''
mkdir -p $out/lib/systemd/user mkdir -p $out/lib/systemd/user
cat > $out/lib/systemd/user/mcp-gateway.service << 'EOF' cat > $out/lib/systemd/user/mcp-gateway.service << EOF
[Unit] [Unit]
Description=MCP Gateway Description=MCP Gateway
After=network-online.target After=network-online.target
@@ -37,7 +37,7 @@ Wants=network-online.target
[Service] [Service]
Type=simple Type=simple
ExecStart=%h/.config/mcp-gateway/mcp-gateway --config %h/.config/mcp-gateway/gateway.yaml serve ExecStart=$out/bin/mcp-gateway --config %h/.config/mcp-gateway/gateway.yaml serve
Restart=on-failure Restart=on-failure
RestartSec=5 RestartSec=5