From 87c44ba6da9c4deb5a388a8791c4a33e612ae177 Mon Sep 17 00:00:00 2001 From: Alexander Miroshnichenko Date: Wed, 6 May 2026 20:02:24 +0300 Subject: [PATCH] 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. --- packages/mcp-gateway/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp-gateway/package.nix b/packages/mcp-gateway/package.nix index 5b346ee..10cf57b 100644 --- a/packages/mcp-gateway/package.nix +++ b/packages/mcp-gateway/package.nix @@ -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