Skip to content

Commit fd09a66

Browse files
feat(tom): add openclaw-gateway as a system service
Adds the nix-openclaw flake input and enables the openclaw-gateway NixOS module on TOM. This runs the OpenClaw gateway under a dedicated 'openclaw' system user with persistent state at /var/lib/openclaw. Changes: - Add nix-openclaw flake input (follows nixpkgs) - Import openclaw-gateway NixOS module in tom configuration - Create machines/tom/services/openclaw-gateway/default.nix - Persist /var/lib/openclaw across reboots (impermanence)
1 parent 23bccd5 commit fd09a66

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
url = "github:nix-community/nixos-generators";
2525
inputs.nixpkgs.follows = "nixpkgs";
2626
};
27+
nix-openclaw = {
28+
url = "github:openclaw/nix-openclaw";
29+
inputs.nixpkgs.follows = "nixpkgs";
30+
};
2731
nixpkgs = {
2832
url = "github:NixOS/nixpkgs/nixos-unstable";
2933
};
@@ -166,6 +170,7 @@
166170
./machines/tom/configuration.nix
167171
inputs.home-manager.nixosModules.home-manager
168172
inputs.impermanence.nixosModules.impermanence
173+
inputs.nix-openclaw.nixosModules.openclaw-gateway
169174
inputs.sops-nix.nixosModules.sops
170175
{
171176
home-manager = {

machines/tom/configuration.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
./services/interception-tools
6161
./services/minecraft-server
6262
./services/ollama
63+
./services/openclaw-gateway
6364
./services/openssh
6465
./services/pipewire
6566
./services/plasma6
@@ -93,6 +94,7 @@
9394
"/etc/ollama/models"
9495
"/srv/minecraft/world"
9596
"/var/lib/nixos"
97+
"/var/lib/openclaw"
9698
"/var/lib/slack"
9799
"/var/lib/soft-serve"
98100
"/var/lib/systemd/coredump"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://github.com/openclaw/openclaw
2+
{ ... }:
3+
{
4+
services.openclaw-gateway = {
5+
enable = true;
6+
port = 18789;
7+
user = "openclaw";
8+
group = "openclaw";
9+
stateDir = "/var/lib/openclaw";
10+
environment = {
11+
NODE_ENV = "production";
12+
};
13+
};
14+
}

0 commit comments

Comments
 (0)