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:
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
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]
|
||||
Description=MCP Gateway
|
||||
After=network-online.target
|
||||
@@ -37,7 +37,7 @@ Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
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
|
||||
RestartSec=5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user