mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-06 05:12:50 +00:00
Add support for managing Copilot CLI global instructions via programs.github-copilot-cli.context, written to copilot-instructions.md under COPILOT_HOME. Also manage custom agents and skills from inline definitions, file paths, and directories, with focused tests and a news entry covering the new options.
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
src = pkgs.writeTextDir "agents/code-reviewer.agent.md" ''
|
|
---
|
|
description: Review changes from a store-path directory fixture.
|
|
tools: ["*"]
|
|
---
|
|
|
|
Focus on correctness and missing coverage.
|
|
'';
|
|
|
|
skillsSrc = pkgs.writeTextDir "skills/external-skill/SKILL.md" ''
|
|
---
|
|
name: external-skill
|
|
description: Store-path directory fixture.
|
|
---
|
|
|
|
Exercise top-level store-path directory handling.
|
|
'';
|
|
in
|
|
{
|
|
programs.github-copilot-cli = {
|
|
enable = true;
|
|
agents = "${src}/agents";
|
|
skills = "${skillsSrc}/skills";
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.copilot/agents/code-reviewer.agent.md
|
|
assertLinkExists home-files/.copilot/agents/code-reviewer.agent.md
|
|
assertFileContent home-files/.copilot/agents/code-reviewer.agent.md \
|
|
"${src}/agents/code-reviewer.agent.md"
|
|
|
|
assertFileExists home-files/.copilot/skills/external-skill/SKILL.md
|
|
assertLinkExists home-files/.copilot/skills/external-skill/SKILL.md
|
|
assertFileContent home-files/.copilot/skills/external-skill/SKILL.md \
|
|
"${skillsSrc}/skills/external-skill/SKILL.md"
|
|
'';
|
|
}
|