Add environment-specific claude-code package distribution system

Development environments now use standard nixpkgs claude-code by default.
Work environments override with custom binary distribution to bypass
corporate npm registry restrictions via Google Cloud Storage.
This commit is contained in:
2025-11-26 17:20:31 -08:00
parent 55f13dfb08
commit 1ff8b81f44
2 changed files with 25 additions and 1 deletions

View File

@@ -4,6 +4,30 @@ let
leader = "cmd"; # Change this to experiment with different leader keys (e.g., "cmd", "ctrl")
in
{
# Claude Code Package Override for Corporate Work Environment
#
# This overlay overrides the default claude-code package specifically for work environments
# where corporate network restrictions may prevent access to npm registry distributions.
#
# Context:
# - The default claude-code package (used in home environments) fetches from npm registry
# - Corporate firewalls and security policies often block npm registry access
# - Our custom claude-code package uses Google Cloud Storage distribution as a workaround
# - This maintains the same package name across environments while adapting to network constraints
#
# Environment-specific behavior:
# - Home environments: Use standard npm-distributed claude-code package
# - Work environments: Use custom binary-distributed claude-code package from GCS
#
# This approach ensures consistent tooling availability regardless of network environment
# while respecting corporate security policies.
nixpkgs.overlays = [
(final: prev: {
unstable = prev.unstable // {
claude-code = prev.custom.claude-code;
};
})
];
# Home Manager configuration for Darwin work laptop
# Corporate-friendly setup with essential development tools

View File

@@ -36,12 +36,12 @@ in
config = mkIf cfg.enable {
home.packages = [
pkgs.unstable.claude-code
pkgs.unstable.claude-code-router
pkgs.unstable.codex
# Custom packages
pkgs.custom.tea-rbw
pkgs.custom.claude-cli
];
# Install Claude Code humanlayer command and agent plugins