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

34 lines
826 B
Nix
Raw Permalink 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";
};
2026-06-20 08:39:19 -08:00
env_file = [ "/run/agenix/openai-api-key" ];
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
''
];
};
};
};
}