Skip to content

Commit 33bb314

Browse files
committed
Improve linear commands integration with symlinkJoin approach
1 parent 83ff158 commit 33bb314

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

common/claude-code/default.nix

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@
2121
# Create and manage ~/.claude directory
2222
home.file.".claude/settings.json".source = ./settings.json;
2323
home.file.".claude/CLAUDE.md".source = ./CLAUDE.md;
24-
home.file.".claude/commands".source = ./commands;
2524

26-
# Fetch and sync linear commands to separate directory
27-
home.file.".claude/commands-linear".source = pkgs.fetchFromGitHub {
28-
owner = "svnlto";
29-
repo = "claude-code-linear-commands";
30-
rev = "main";
31-
sha256 = "07zl1yfb1pvkyk0kqhdw7z5dpi8078jdybnm0gzwjb13hxk17s21";
32-
} + "/commands";
25+
# Combine local commands with linear commands
26+
home.file.".claude/commands".source = pkgs.symlinkJoin {
27+
name = "claude-commands";
28+
paths = [
29+
./commands
30+
(pkgs.runCommand "linear-commands" {} ''
31+
mkdir -p $out/linear
32+
cp -r ${pkgs.fetchFromGitHub {
33+
owner = "svnlto";
34+
repo = "claude-code-linear-commands";
35+
rev = "main";
36+
sha256 = "07zl1yfb1pvkyk0kqhdw7z5dpi8078jdybnm0gzwjb13hxk17s21";
37+
}}/commands/* $out/linear/
38+
'')
39+
];
40+
};
3341

3442
# Create necessary directories
3543
home.file.".claude/.keep".text = "";

0 commit comments

Comments
 (0)