Skip to content

Commit 902505b

Browse files
openclaw: bring tom to slack in persistent http connection kept (#82)
Co-authored-by: @theorderingmachine <tom@deorr.co>
1 parent 129cf76 commit 902505b

File tree

14 files changed

+531
-4
lines changed

14 files changed

+531
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ versioning is done in a continuous fashion without worries of breaking changes.
66

77
## patches
88

9+
- `openclaw`: bring tom to slack in persistent http connection kept 2026-04-05
910
- `systemd`: protect against services finding another other process 2026-04-04
1011
- `nix`: import language servers and formatted linter from upstream 2026-04-04
1112
- `vhs`: record terminal demos with tapes that share in caring gifs 2026-03-30

cloud/backup.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module "backup" {
22
for_each = {
33
git = "tom.git"
44
minecraft = "tom.25565"
5+
openclaw = "tom.openclaw"
56
}
67

78
source = "./modules/backup"
@@ -32,3 +33,15 @@ output "backup_minecraft_secret_access_key" {
3233
value = module.backup["minecraft"].secret_access_key
3334
sensitive = true
3435
}
36+
37+
# https://opentofu.org/docs/language/values/outputs/
38+
output "backup_openclaw_access_key_id" {
39+
value = module.backup["openclaw"].access_key_id
40+
sensitive = true
41+
}
42+
43+
# https://opentofu.org/docs/language/values/outputs/
44+
output "backup_openclaw_secret_access_key" {
45+
value = module.backup["openclaw"].secret_access_key
46+
sensitive = true
47+
}

cloud/configuration.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
email = "zim@o526.net";
6767
group = "nginx";
6868
};
69+
"tom.o526.net" = {
70+
email = "zim@o526.net";
71+
group = "nginx";
72+
};
6973
"o526.net" = {
7074
email = "zim@o526.net";
7175
group = "nginx";
@@ -124,6 +128,17 @@
124128
proxyWebsockets = true;
125129
};
126130
};
131+
"tom.o526.net" = {
132+
enableACME = true;
133+
forceSSL = true;
134+
locations."/slack/events" = {
135+
proxyPass = "http://10.100.0.2:18789";
136+
proxyWebsockets = false;
137+
extraConfig = ''
138+
proxy_set_header x-forwarded-user "slack";
139+
'';
140+
};
141+
};
127142
"o526.net" = {
128143
enableACME = true;
129144
forceSSL = true;

flake.lock

Lines changed: 113 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
url = "github:LnL7/nix-darwin";
2121
inputs.nixpkgs.follows = "nixpkgs";
2222
};
23+
nix-openclaw = {
24+
url = "github:openclaw/nix-openclaw";
25+
inputs.nixpkgs.follows = "nixpkgs";
26+
};
2327
nixos-generators = {
2428
url = "github:nix-community/nixos-generators";
2529
inputs.nixpkgs.follows = "nixpkgs";
@@ -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: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
};
1414
};
1515
nixpkgs.config = {
16+
allowInsecurePredicate =
17+
pkg:
18+
builtins.elem (pkgs.lib.getName pkg) [
19+
"openclaw"
20+
];
1621
allowUnfreePredicate =
1722
pkg:
1823
builtins.elem (pkgs.lib.getName pkg) [
@@ -60,6 +65,7 @@
6065
./services/interception-tools
6166
./services/minecraft-server
6267
./services/ollama
68+
./services/openclaw-gateway
6369
./services/openssh
6470
./services/pipewire
6571
./services/plasma6
@@ -93,6 +99,7 @@
9399
"/etc/ollama/models"
94100
"/srv/minecraft/world"
95101
"/var/lib/nixos"
102+
"/var/lib/openclaw"
96103
"/var/lib/slack"
97104
"/var/lib/soft-serve"
98105
"/var/lib/systemd/coredump"
@@ -159,6 +166,7 @@
159166
5000 # Quintus
160167
8082 # Todo's Guide
161168
8083 # Endpoints
169+
18789 # OpenClaw
162170
23231 # Soft Serve
163171
25565 # Minecraft
164172
];
@@ -219,6 +227,12 @@
219227
group = "minecraft";
220228
sopsFile = ./services/restic/vault.minecraft.env;
221229
};
230+
"aws/iam/openclaw" = {
231+
format = "dotenv";
232+
owner = "openclaw";
233+
group = "openclaw";
234+
sopsFile = ./services/restic/vault.openclaw.env;
235+
};
222236
"github/oauth" = {
223237
owner = config.users.users.default.name;
224238
group = "wheel";
@@ -283,6 +297,18 @@
283297
owner = "slacks";
284298
group = "slacks";
285299
};
300+
"openclaw/env" = {
301+
format = "dotenv";
302+
owner = "openclaw";
303+
group = "openclaw";
304+
sopsFile = ./services/openclaw-gateway/vault.env;
305+
};
306+
"openclaw/ssh/private" = {
307+
owner = "openclaw";
308+
group = "openclaw";
309+
key = "tom/ssh/private";
310+
path = "/var/lib/openclaw/.ssh/id_ed25519";
311+
};
286312
"restic/git" = {
287313
owner = "git";
288314
group = "git";
@@ -291,6 +317,10 @@
291317
owner = "minecraft";
292318
group = "minecraft";
293319
};
320+
"restic/openclaw" = {
321+
owner = "openclaw";
322+
group = "openclaw";
323+
};
294324
"slack/snaek" = {
295325
format = "dotenv";
296326
owner = "snaek";
@@ -408,6 +438,11 @@
408438
isSystemUser = true;
409439
group = "git";
410440
};
441+
openclaw = {
442+
isSystemUser = true;
443+
group = "openclaw";
444+
home = "/var/lib/openclaw";
445+
};
411446
quintus = {
412447
isSystemUser = true;
413448
group = "quintus";
@@ -439,6 +474,7 @@
439474
endpoints = { };
440475
etime = { };
441476
git = { };
477+
openclaw = { };
442478
quintus = { };
443479
slacks = { };
444480
snaek = { };

machines/tom/secrets/vault.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ github:
2424
restic:
2525
git: ENC[AES256_GCM,data:HiSNgy2BByydX5OpVCno0jIE2tt+XsOc/SqXvmpf2th1OAFauvF+FOrGywM=,iv:DgBnpVXapP39J4eRzy4/DRWHfOc0dk51pMi32XWHlrQ=,tag:7T2kqGV/l6mKRNna7S9bJQ==,type:str]
2626
minecraft: ENC[AES256_GCM,data:tk4jvTaCTGDK1RGa/uW6RWyjtUKl,iv:EJLhXDhGBnnWmDaKuhDPl4/daoVnnAN8v0mIalS1ODw=,tag:saefTwBI1pDIZEZ10t/ePw==,type:str]
27+
openclaw: ENC[AES256_GCM,data:u1XfiniFMqWS+x7xh8/NbPKjWLk1MbOZIHv3BtftL3zcwV0eezfbraLOBl8=,iv:xJfIl1T6L+xmVLF5cEYq2e58DMLUQGd9OoCFwpffbIo=,tag:Emx/SllzPoes7WQpNE6Vug==,type:str]
2728
tailscale:
2829
auth: ENC[AES256_GCM,data:6LWj2Cx8DLXpxPH0MnttV0exwkQe7bsxB84aKMGUupws0GAsL0YMFC/yF4ffz5u9109mcMsMY3HatzLpuw4=,iv:hFW8p2fZbprUS1TIl5VR8nwfwey7zwkKN9YPKADzw1s=,tag:DweIRvZNHOUXdoKJr1CDtg==,type:str]
2930
tom:
@@ -55,7 +56,7 @@ sops:
5556
ZkxZVFpHMXpPaUhTTFRQZExXZXlrckkKgF4x8xxm1WeRHWmMItTkWUelYnHd0d0v
5657
rXpwaQ/l79BzAsGy3YmENr/w0/pOTYXTNXSR1dam46qnJuFflqxhhg==
5758
-----END AGE ENCRYPTED FILE-----
58-
lastmodified: "2026-03-07T21:27:42Z"
59-
mac: ENC[AES256_GCM,data:ZANJKMW8EuRdi3dywpodG4i/9b66w/iYMjcF0kzLcB5Qvk3669zrlH3G55WaeUTJjd7MA7l5CB4aM8jH5KvIpYA5W7wDApAE3DC8HTXVXPWZdrr1ldZXVzg08lYnucIWXzfJLiQ2qmX7oo0uzP2UTZ6H60Nj5WUkEmNqDfxywo0=,iv:uiF9sjwpatspbhC7tMD3mB3wM+ElbqPtD06V09uhAgc=,tag:s7L8sKAVIK1JZMkFx5+5VA==,type:str]
59+
lastmodified: "2026-04-06T02:48:13Z"
60+
mac: ENC[AES256_GCM,data:qImApZnJe3DEx0ke5+ZjpaKH4ZwYHGXexLID/i5w1wLv+6eqVnVj5MD5Kxea13lPGvmrMqykxkcpylKKlZpZi17dIaj9aJhajAqxvLP/qJb21RFj9kSXs/C4iOgxZ8rYmyBlP8mMPsm3mV42FcXx3at9vDEkwHmWOMqpj4Hg56o=,iv:NyPBukffrqy+xzib1Je9EDxDmmQSqZ0XeUJQfi5kook=,tag:Rph8z8u+N/7KemvhoOl5vA==,type:str]
6061
unencrypted_suffix: _unencrypted
61-
version: 3.12.1
62+
version: 3.12.2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
keys:
2+
- &tom age1dujf55uzev2nnpq6c2drn0e8pmpxay22qqfsavwaxqakwn9se5hsputgx4
3+
creation_rules:
4+
- path_regex: \.env$
5+
key_groups:
6+
- age:
7+
- *tom

0 commit comments

Comments
 (0)