Skip to content

Commit 1a49a3c

Browse files
committed
fix: Linux compatibility updates
- Use portable paths (run mkdir/ln) instead of hardcoded /bin paths - Update config format for clawdbot schema changes - Disable memory slot on Linux (plugins.slots.memory = "none") - Update to upstream clawdbot main (includes memory slot none fix)
1 parent aa60a29 commit 1a49a3c

File tree

3 files changed

+46
-18
lines changed

3 files changed

+46
-18
lines changed

nix/generated/clawdbot-config-options.nix

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4296,6 +4296,28 @@ in
42964296

42974297
models = lib.mkOption {
42984298
type = t.submodule { options = {
4299+
bedrockDiscovery = lib.mkOption {
4300+
type = t.submodule { options = {
4301+
defaultContextWindow = lib.mkOption {
4302+
type = t.int;
4303+
};
4304+
defaultMaxTokens = lib.mkOption {
4305+
type = t.int;
4306+
};
4307+
enabled = lib.mkOption {
4308+
type = t.bool;
4309+
};
4310+
providerFilter = lib.mkOption {
4311+
type = t.listOf (t.str);
4312+
};
4313+
refreshInterval = lib.mkOption {
4314+
type = t.int;
4315+
};
4316+
region = lib.mkOption {
4317+
type = t.str;
4318+
};
4319+
}; };
4320+
};
42994321
mode = lib.mkOption {
43004322
type = t.oneOf [ t.enum [ "merge" ] t.enum [ "replace" ] ];
43014323
};

nix/modules/home-manager/clawdbot.nix

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,28 @@ let
3333
}
3434
];
3535
};
36+
} // lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
37+
# Disable memory slot on Linux - memory-core plugin not available for headless servers
38+
# See: https://github.com/clawdbot/clawdbot/blob/main/docs/concepts/memory.md
39+
plugins.slots.memory = "none";
3640
};
3741

3842
mkTelegramConfig = inst: lib.optionalAttrs inst.providers.telegram.enable {
39-
telegram = {
40-
enabled = true;
41-
tokenFile = inst.providers.telegram.botTokenFile;
42-
allowFrom = inst.providers.telegram.allowFrom;
43-
groups = inst.providers.telegram.groups;
43+
channels = {
44+
telegram = {
45+
enabled = true;
46+
tokenFile = inst.providers.telegram.botTokenFile;
47+
allowFrom = inst.providers.telegram.allowFrom;
48+
groups = inst.providers.telegram.groups;
49+
};
4450
};
4551
};
4652

4753
mkRoutingConfig = inst: {
4854
messages = {
4955
queue = {
5056
mode = inst.routing.queue.mode;
51-
byProvider = inst.routing.queue.byProvider;
57+
byChannel = inst.routing.queue.byProvider;
5258
};
5359
};
5460
};
@@ -996,13 +1002,13 @@ in {
9961002
firstParty = {
9971003
summarize.enable = lib.mkOption {
9981004
type = lib.types.bool;
999-
default = true;
1000-
description = "Enable the summarize plugin (first-party).";
1005+
default = pkgs.stdenv.hostPlatform.isDarwin; # macOS-only: uses macOS-specific dependencies
1006+
description = "Enable the summarize plugin (first-party, macOS only).";
10011007
};
10021008
peekaboo.enable = lib.mkOption {
10031009
type = lib.types.bool;
1004-
default = true;
1005-
description = "Enable the peekaboo plugin (first-party).";
1010+
default = pkgs.stdenv.hostPlatform.isDarwin; # macOS-only: screenshot tool
1011+
description = "Enable the peekaboo plugin (first-party, macOS only).";
10061012
};
10071013
oracle.enable = lib.mkOption {
10081014
type = lib.types.bool;
@@ -1022,7 +1028,7 @@ in {
10221028
camsnap.enable = lib.mkOption {
10231029
type = lib.types.bool;
10241030
default = false;
1025-
description = "Enable the camsnap plugin (first-party).";
1031+
description = "Enable the camsnap plugin (first-party, macOS only).";
10261032
};
10271033
gogcli.enable = lib.mkOption {
10281034
type = lib.types.bool;
@@ -1042,7 +1048,7 @@ in {
10421048
imsg.enable = lib.mkOption {
10431049
type = lib.types.bool;
10441050
default = false;
1045-
description = "Enable the imsg plugin (first-party).";
1051+
description = "Enable the imsg plugin (first-party, macOS only).";
10461052
};
10471053
};
10481054

@@ -1176,13 +1182,13 @@ in {
11761182
);
11771183

11781184
home.activation.clawdbotDirs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
1179-
/bin/mkdir -p ${lib.concatStringsSep " " (lib.concatMap (item: item.dirs) instanceConfigs)}
1180-
${lib.optionalString (pluginStateDirsAll != []) "/bin/mkdir -p ${lib.concatStringsSep " " pluginStateDirsAll}"}
1185+
run mkdir -p ${lib.concatStringsSep " " (lib.concatMap (item: item.dirs) instanceConfigs)}
1186+
${lib.optionalString (pluginStateDirsAll != []) "run mkdir -p ${lib.concatStringsSep " " pluginStateDirsAll}"}
11811187
'';
11821188

11831189
home.activation.clawdbotConfigFiles = lib.hm.dag.entryAfter [ "clawdbotDirs" ] ''
11841190
set -euo pipefail
1185-
${lib.concatStringsSep "\n" (map (item: "/bin/ln -sfn ${item.configFile} ${item.configPath}") instanceConfigs)}
1191+
${lib.concatStringsSep "\n" (map (item: "run ln -sfn ${item.configFile} ${item.configPath}") instanceConfigs)}
11861192
'';
11871193

11881194
home.activation.clawdbotPluginGuard = lib.hm.dag.entryAfter [ "writeBoundary" ] ''

nix/sources/clawdbot-source.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
owner = "clawdbot";
44
repo = "clawdbot";
5-
rev = "242add587f39f4ad3f8ea4f48e815d7f10917aaa";
6-
hash = "sha256-H2Cq2IXiXdGgmcjslT/1XDGGXEPxniMh9MJiMhk7vHM=";
7-
pnpmDepsHash = "sha256-lp4Ef237ESao7OzCjkEv7FZArh68XHSfrHRjvaUBo2Q=";
5+
rev = "d57cb2e1a88e606654cad43a2312a94214ff4fa3";
6+
hash = "sha256-BTKb9bw/EjTi1Dol2ZDJjaTKAwC8+WJC3Ip4x6+CmTw=";
7+
pnpmDepsHash = "sha256-I3+x36n6nd3oMCeKIKLNRLFfw/hC+t4nwl5IxffQhFc=";
88
}

0 commit comments

Comments
 (0)