CI concurrency + deep-merge config fragments; fix clawdinator-2 channels

- Cancel in-progress image builds on new pushes (concurrency)
- Add services.clawdinator.configFragments for deep-merge tweaks
- Use configFragments in clawdinator-2 to disable telegram without clobbering discord

No host changes; intended to ship via next AMI build.
This commit is contained in:
joshp123 2026-02-15 13:33:38 -08:00
parent 5e1977a078
commit e5e959f90a
3 changed files with 21 additions and 4 deletions

View File

@ -1,5 +1,9 @@
name: Build NixOS Image
concurrency:
group: image-build-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
push:

View File

@ -21,6 +21,10 @@
networking.firewall.allowedTCPPorts = [ 22 ];
services.clawdinator.config.plugins.entries.telegram.enabled = false;
services.clawdinator.config.channels.telegram.enabled = false;
services.clawdinator.configFragments = [
{
plugins.entries.telegram.enabled = false;
channels.telegram.enabled = false;
}
];
}

View File

@ -2,10 +2,13 @@
let
cfg = config.services.clawdinator;
configFragmentsMerged = lib.foldl' lib.recursiveUpdate {} cfg.configFragments;
effectiveConfig = lib.recursiveUpdate cfg.config configFragmentsMerged;
configSource =
if cfg.configFile != null
then cfg.configFile
else pkgs.writeText "openclaw.json" (builtins.toJSON cfg.config);
else pkgs.writeText "openclaw.json" (builtins.toJSON effectiveConfig);
updateScript = pkgs.writeShellScript "clawdinator-self-update" ''
set -euo pipefail
@ -310,7 +313,13 @@ in
config = mkOption {
type = types.attrs;
default = {};
description = "Raw Clawbot config JSON (merged into openclaw.json).";
description = "Raw Clawbot config JSON (base).";
};
configFragments = mkOption {
type = types.listOf types.attrs;
default = [];
description = "Additional OpenClaw config fragments, recursively merged into services.clawdinator.config (deep merge). Use this for small per-host tweaks without clobbering sibling keys.";
};
configFile = mkOption {