diff --git a/home/common/programs/claude/default.nix b/home/common/programs/claude/default.nix index e70a161..6dbea6e 100644 --- a/home/common/programs/claude/default.nix +++ b/home/common/programs/claude/default.nix @@ -9,7 +9,30 @@ @anthropic-ai/claude-code ''; - home.file.".claude/commands".source = ./commands; - home.file.".claude/settings.json".source = ./settings.json; + # Create writable commands directory and symlink individual command files + home.activation.claudeCommandsDir = lib.hm.dag.entryAfter ["writeBoundary"] '' + COMMANDS_DIR="$HOME/.claude/commands" + SETTINGS_FILE="$HOME/.claude/settings.json" + + # Remove old symlink if it exists + if [ -L "$COMMANDS_DIR" ]; then + $DRY_RUN_CMD rm -f "$COMMANDS_DIR" + fi + + # Create the directory if it doesn't exist + $DRY_RUN_CMD mkdir -p "$COMMANDS_DIR" + + # Symlink individual command files from nix store + $DRY_RUN_CMD ln -sf ${./commands/merge.md} "$COMMANDS_DIR/merge.md" + $DRY_RUN_CMD ln -sf ${./commands/update.md} "$COMMANDS_DIR/update.md" + $DRY_RUN_CMD ln -sf ${./commands/work.md} "$COMMANDS_DIR/work.md" + + # Copy settings.json to make it writable (only if it doesn't exist or is a symlink) + if [ -L "$SETTINGS_FILE" ] || [ ! -f "$SETTINGS_FILE" ]; then + $DRY_RUN_CMD rm -f "$SETTINGS_FILE" + $DRY_RUN_CMD cp ${./settings.json} "$SETTINGS_FILE" + $DRY_RUN_CMD chmod 644 "$SETTINGS_FILE" + fi + ''; home.file.".claude/CLAUDE.md".source = ./CLAUDE.md; } diff --git a/home/common/programs/claude/settings.json b/home/common/programs/claude/settings.json index 1629ccc..38732e9 100644 --- a/home/common/programs/claude/settings.json +++ b/home/common/programs/claude/settings.json @@ -38,7 +38,21 @@ "matcher": "*", "hooks": [{ "type": "command", "command": "printf '\\a'" }] } + ], + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "node \"/home/naps62/.claude/hooks/gsd-check-update.js\"" + } + ] + } ] }, - "$schema": "https://json.schemastore.org/claude-code-settings.json" + "$schema": "https://json.schemastore.org/claude-code-settings.json", + "statusLine": { + "type": "command", + "command": "node \"/home/naps62/.claude/hooks/gsd-statusline.js\"" + } } diff --git a/home/common/programs/dev.nix b/home/common/programs/dev.nix index 2e3e0ac..665f09b 100644 --- a/home/common/programs/dev.nix +++ b/home/common/programs/dev.nix @@ -10,6 +10,12 @@ enable = true; enableZshIntegration = true; nix-direnv.enable = true; + + # Add devenv support + stdlib = '' + # Source devenv direnvrc for use_devenv function + eval "$(devenv direnvrc)" + ''; }; }; diff --git a/hosts/common/features/android-studio.nix b/hosts/common/features/android-studio.nix index 19f3385..81bfb7d 100644 --- a/hosts/common/features/android-studio.nix +++ b/hosts/common/features/android-studio.nix @@ -5,8 +5,6 @@ "adbusers" ]; - programs.adb.enable = true; - # services.udev.packages = with pkgs; [ # android-udev-rules # ]; diff --git a/hosts/common/features/networking.nix b/hosts/common/features/networking.nix index 561aae1..76c09b5 100644 --- a/hosts/common/features/networking.nix +++ b/hosts/common/features/networking.nix @@ -4,7 +4,7 @@ networkmanager = { enable = true; }; - wireless.iwd.enable = true; + # wireless.iwd.enable = true; }; services.avahi = {