feat(mcp-gateway): add systemd user unit file to package
Install mcp-gateway.service to $out/lib/systemd/user/ so it can be activated via systemd.user.packages. The service runs: mcp-gateway --config ~/.config/mcp-gateway/gateway.yaml serve
This commit is contained in:
@@ -27,6 +27,24 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 /dev/stdout $out/lib/systemd/user/mcp-gateway.service <<EOF
|
||||
[Unit]
|
||||
Description=MCP Gateway
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=%h/.config/mcp-gateway/mcp-gateway --config %h/.config/mcp-gateway/gateway.yaml serve
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
EOF
|
||||
'';
|
||||
|
||||
passthru.category = "MCP Servers";
|
||||
|
||||
meta = with lib; {
|
||||
|
||||
Reference in New Issue
Block a user