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:
parent
5d0e1fcdd6
commit
ba396eed12
2 changed files with 82 additions and 0 deletions
27
modules/home/cli-apps/claude-code/default.nix
Normal file
27
modules/home/cli-apps/claude-code/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue