claude-code: add support for output styles

Adds an option to populate the output_styles directory,
which is used by Claude Code to make custom output styles available.
This commit is contained in:
Rane 2026-02-22 14:44:34 +11:00 committed by Austin Horstman
parent 920c07c691
commit bff85cb66b
5 changed files with 73 additions and 1 deletions

View file

@ -17,4 +17,6 @@
claude-code-commands-path = ./commands-path.nix;
claude-code-skills-path = ./skills-path.nix;
claude-code-mixed-content = ./mixed-content.nix;
claude-code-output-styles = ./output-styles.nix;
claude-code-output-styles-not-set = ./output-styles-not-set.nix;
}

View file

@ -0,0 +1,12 @@
{
programs.claude-code = {
enable = true;
settings = {
theme = "dark";
};
};
nmt.script = ''
assertPathNotExists home-files/.claude/output-styles
'';
}

View file

@ -0,0 +1,25 @@
{
programs.claude-code = {
enable = true;
outputStyles = {
inline-style = ''
# Inline Output Style
This is an inline output style for testing.
It should be written to .claude/output-styles/inline-style.md
'';
path-style = ./test-output-style.md;
};
};
nmt.script = ''
assertFileExists home-files/.claude/output-styles/inline-style.md
assertFileExists home-files/.claude/output-styles/path-style.md
assertFileContent home-files/.claude/output-styles/path-style.md \
${./test-output-style.md}
assertFileRegex home-files/.claude/output-styles/inline-style.md \
'This is an inline output style for testing'
'';
}

View file

@ -0,0 +1,4 @@
# Test Output Style
This is a test output style loaded from a file path.
Used to verify path support functionality for output styles.