petersweb-infra/nixos/arion-openclaw/arion-compose.nix

33 lines
773 B
Nix
Raw Normal View History

{ pkgs, ... }:
{
project.name = "openclaw";
services = {
gateway = {
service = {
image = "node:22-alpine";
container_name = "openclaw-gateway";
restart = "unless-stopped";
network_mode = "host";
volumes = [
"/var/openclaw/gateway:/app"
"/root/.openclaw:/root/.openclaw"
];
environment = {
OPENCLAW_HOME = "/root/.openclaw";
};
command = [
"sh" "-c"
''
set -e
if [ ! -f /app/node_modules/.bin/openclaw ]; then
cd /app && npm install openclaw@latest
fi
exec /app/node_modules/.bin/openclaw gateway --port 18789 --dev --auth none
''
];
};
};
};
}