flake: Add slop-broker from its own repository
The broker, its NixOS and home-manager modules and the agents' guide now live in the `slop-broker` repository, which this flake takes as an input: its overlay provides `pkgs.slop-broker`, and the common modules import `services.slop-broker*` and `programs.slop`. What's specific to these boxes stays here: tmproot persistence for the broker and its builder, `my.agents.slop` and the devshell's `slop` commands, which `docs/slop-broker.md` describes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
75f6c1a064
commit
71ed076f12
10 files changed
+108
-4
No files matched your search
@@ -1,17 +1,21 @@
|
||||
{ lib, pkgs, inputs, config, options, ... }:
|
||||
let
|
||||
inherit (lib) mkIf optionalAttrs;
|
||||
inherit (lib) mkIf optional optionalAttrs;
|
||||
inherit (lib.my) mkBoolOpt';
|
||||
|
||||
cfg = config.my.agents;
|
||||
agentPkgs = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
slopGuide = "${pkgs.slop-broker}/share/slop-broker/slop-tools.md";
|
||||
in
|
||||
{
|
||||
options.my.agents = {
|
||||
enable = mkBoolOpt' false "Whether to install and configure coding agents (Claude Code, Codex).";
|
||||
slop.enable = mkBoolOpt' false "Whether agents use the `slop` client for privileged operations.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = optional cfg.slop.enable pkgs.slop-broker;
|
||||
|
||||
programs = {
|
||||
# TODO: Remove mutableSettings guard when Home Manager 26.11 releases; 26.05 lacks it.
|
||||
codex = {
|
||||
@@ -34,11 +38,16 @@ in
|
||||
};
|
||||
} // optionalAttrs (options.programs.codex ? mutableSettings) {
|
||||
mutableSettings = true;
|
||||
} // optionalAttrs cfg.slop.enable {
|
||||
context = slopGuide;
|
||||
};
|
||||
|
||||
claude-code = {
|
||||
enable = true;
|
||||
package = agentPkgs.claude-code;
|
||||
rules = optionalAttrs cfg.slop.enable {
|
||||
slop = slopGuide;
|
||||
};
|
||||
settings = {
|
||||
model = "opus";
|
||||
theme = "auto";
|
||||
|
||||
Reference in new issue
Block a user