diff --git a/configs/nixos/AGENTS.md b/configs/nixos/AGENTS.md index 27dd8fa..e2b862f 100644 --- a/configs/nixos/AGENTS.md +++ b/configs/nixos/AGENTS.md @@ -32,6 +32,8 @@ - Use produced literals for Herdr key names that include shifted punctuation. For example, use `prefix+<` instead of `prefix+shift+comma`. +- Put global Pi extension sources in `configs/nixos/modules/shell/pi/extensions/`. + Home Manager deploys them to `~/.pi/agent/extensions/`. - Treat Home Manager-managed Pi extension, prompt, and skill directories as generated output. Do not edit those directories except for throwaway development or local experiments. Promote finished work into the NixOS configuration before treating it as deployed. diff --git a/configs/nixos/modules/shell/herdr.nix b/configs/nixos/modules/shell/herdr.nix index e2c530d..b3d1709 100644 --- a/configs/nixos/modules/shell/herdr.nix +++ b/configs/nixos/modules/shell/herdr.nix @@ -18,8 +18,6 @@ in home-manager.users.${user} = { home.packages = [ pkgs.herdr ]; - # Refresh the vendored project-local Pi extension from the monorepo root. - # Run `PI_CODING_AGENT_DIR=$PWD/.pi herdr integration install pi`. xdg.configFile."herdr/config.toml".text = '' [keys] prefix = "ctrl+space" diff --git a/configs/nixos/modules/shell/pi/default.nix b/configs/nixos/modules/shell/pi/default.nix index feb1ae6..17921b9 100644 --- a/configs/nixos/modules/shell/pi/default.nix +++ b/configs/nixos/modules/shell/pi/default.nix @@ -40,9 +40,17 @@ in }; }; - # The first declarative rollout replaces the interactive settings file. - # Login state stays in auth.json, which this module does not manage. - home.file."${piDir}/settings.json".force = true; + home.file = { + # The first declarative rollout replaces the interactive settings file. + # Login state stays in auth.json, which this module does not manage. + "${piDir}/settings.json".force = true; + + "${piDir}/extensions" = { + source = ./extensions; + recursive = true; + force = true; + }; + }; }; }; } diff --git a/.pi/extensions/compact-status.ts b/configs/nixos/modules/shell/pi/extensions/compact-status.ts similarity index 100% rename from .pi/extensions/compact-status.ts rename to configs/nixos/modules/shell/pi/extensions/compact-status.ts diff --git a/.pi/extensions/herdr-agent-state.ts b/configs/nixos/modules/shell/pi/extensions/herdr-agent-state.ts similarity index 100% rename from .pi/extensions/herdr-agent-state.ts rename to configs/nixos/modules/shell/pi/extensions/herdr-agent-state.ts