feat(claude-code): manage commands and skills via home-manager

Add a home-manager module that symlinks config/claude/commands and
config/claude/skills into ~/.claude, mirroring the opencode module.
Seed the commands directory with a /commit slash command.
This commit is contained in:
Harald Hoyer 2026-05-05 14:03:44 +02:00
parent 5d0e1fcdd6
commit ba396eed12
2 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{
lib,
config,
...
}:
let
inherit (lib) mkIf;
inherit (lib.metacfg) mkBoolOpt;
cfg = config.metacfg.cli-apps.claude-code;
in
{
options.metacfg.cli-apps.claude-code = {
enable = mkBoolOpt true "Enable claude-code config.";
};
config = mkIf cfg.enable {
home.file.".claude/commands" = {
source = ../../../../config/claude/commands;
recursive = true;
};
home.file.".claude/skills" = {
source = ../../../../config/claude/skills;
recursive = true;
};
};
}