refactor(shell): gate herdr integrations by agents

This commit is contained in:
2026-09-13 06:46:02 -04:00
parent 3c2d9df777
commit c40379cd00

View File

@@ -10,23 +10,7 @@ let
user = config.user.name; user = config.user.name;
in in
{ {
options.modules.shell.herdr = { options.modules.shell.herdr.enable = lib.mkEnableOption "Herdr, a terminal multiplexer for coding agents";
enable = lib.mkEnableOption "Herdr, a terminal multiplexer for coding agents";
integrations = {
pi.enable = lib.mkOption {
type = lib.types.bool;
default = config.modules.shell.pi.enable;
description = "Whether to install Herdr's Pi agent-state integration.";
};
omp.enable = lib.mkOption {
type = lib.types.bool;
default = config.modules.shell.omp.enable;
description = "Whether to install Herdr's OMP agent-state integration.";
};
};
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
registry.shell-shortcut.${config.networking.hostName}.hs = "herdr --session"; registry.shell-shortcut.${config.networking.hostName}.hs = "herdr --session";
@@ -60,13 +44,13 @@ in
kitty_graphics = true kitty_graphics = true
''; '';
} }
(lib.mkIf cfg.integrations.pi.enable { (lib.mkIf config.modules.shell.pi.enable {
home.file.".pi/agent/extensions/herdr-agent-state.ts" = { home.file.".pi/agent/extensions/herdr-agent-state.ts" = {
source = "${pkgs.herdr.src}/src/integration/assets/pi/herdr-agent-state.ts"; source = "${pkgs.herdr.src}/src/integration/assets/pi/herdr-agent-state.ts";
force = true; force = true;
}; };
}) })
(lib.mkIf cfg.integrations.omp.enable { (lib.mkIf config.modules.shell.omp.enable {
home.file.".omp/agent/extensions/herdr-omp-agent-state.ts" = { home.file.".omp/agent/extensions/herdr-omp-agent-state.ts" = {
source = "${pkgs.herdr.src}/src/integration/assets/omp/herdr-agent-state.ts"; source = "${pkgs.herdr.src}/src/integration/assets/omp/herdr-agent-state.ts";
force = true; force = true;