diff --git a/flake.lock b/flake.lock index a3a9b7c2..a15ca46a 100644 --- a/flake.lock +++ b/flake.lock @@ -163,6 +163,27 @@ "type": "github" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "pi-claude-bridge", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1778716662, + "narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -608,6 +629,21 @@ "type": "github" } }, + "import-tree_3": { + "locked": { + "lastModified": 1778781969, + "narHash": "sha256-Jjuz5CmSkur8KvLDoGa+vylEp+RkQtv4mt/qcMznpH0=", + "owner": "vic", + "repo": "import-tree", + "rev": "d321337efd0f23a9eb14a42adb7b2c29313ab274", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, "mac-app-util": { "inputs": { "cl-nix-lite": "cl-nix-lite", @@ -877,6 +913,28 @@ "type": "github" } }, + "pi-claude-bridge": { + "inputs": { + "flake-parts": "flake-parts_4", + "import-tree": "import-tree_3", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1782699420, + "narHash": "sha256-Cb57RECluc823CxuiLpEkkwfEZCp1fJmIvA+bpykKog=", + "owner": "rrvsh", + "repo": "pi-claude-bridge-nix", + "rev": "332eb2b3cbbbe8ff0b73acd53e46389bbd2d9fb8", + "type": "github" + }, + "original": { + "owner": "rrvsh", + "repo": "pi-claude-bridge-nix", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -917,6 +975,7 @@ "nixpkgs-firefox-darwin": "nixpkgs-firefox-darwin", "nixpkgs-master": "nixpkgs-master", "pi": "pi", + "pi-claude-bridge": "pi-claude-bridge", "sops-nix": "sops-nix", "waybar-peek": "waybar-peek" } diff --git a/flake.nix b/flake.nix index 3d0e4908..1c1ba803 100644 --- a/flake.nix +++ b/flake.nix @@ -44,5 +44,9 @@ }; mac-app-util.url = "github:hraban/mac-app-util"; pi.url = "github:rrvsh/pi-coding-agent-nix"; + pi-claude-bridge = { + url = "github:rrvsh/pi-claude-bridge-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } diff --git a/nix/modules/claude-code.nix b/nix/modules/claude-code.nix index 1f8796ee..b1a37d0d 100644 --- a/nix/modules/claude-code.nix +++ b/nix/modules/claude-code.nix @@ -1,12 +1,17 @@ +{ inputs, ... }: { config.flake.allowedUnfreePackages = [ "claude-code" ]; config.flake.modules.darwin.claude-code = { pkgs, ... }: + let + system = pkgs.stdenv.hostPlatform.system; + bridge = inputs.pi-claude-bridge.packages.${system}.pi-claude-bridge; + in { home-manager.sharedModules = [ { home.packages = [ pkgs.claude-code ]; - programs.pi-coding-agent.settings.packages = [ "npm:@vanillagreen/pi-claude-bridge" ]; + programs.pi-coding-agent.settings.packages = [ bridge.passthru.packagePath ]; } ]; };