feat(wrapperModules.claude-code): init#181
Conversation
532c01f to
d48b8a8
Compare
|
Oh. Um, so that its part of this commit, can you add in the attrset on this line here Line 14 in 346f573 (sorry I know that part of the flake is a bit of a mess, its for non-flake compat) The test environment doesn't want to build claude code. That should fix the issue. Edit: Thanks! Lets see! The flaky tests might strike again too, if jujutsu or mpv fails thats not you. |
d48b8a8 to
6f869ee
Compare
|
hmm running it locally it doesn't seem to care if i changed the line you said, but the section above makes it happy: else if inputs.nixpkgs.legacyPackages.${system} or null != null then
import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
} |
|
Oh. That makes sense actually. I guess there isnt a way to do that without reinstantiating pkgs. Yeah do that one too please. Thanks, sorry about that. People provide their own pkgs for their modules when they build them, so this only affects the tests. And it doesn't affect how it fetches the lib either. It actually doesn't affect the docs either. |
6f869ee to
6b1e7a3
Compare
|
yep lol i tested my branch of the module in my config first and it worked, pushed branch, then realized i should run nix flake check in the repo at ~the same time you first commented xD |
|
that would be mpv that time... It seems to sometimes make it fail the first run but I cannot figure out why. jujutsu also. And only in actions. |
|
I can go over that section at the top of the flake on my own after this commit, but since this works, that part is fine for now. |
|
Thoughts on the option about unsetting the api variable? I use opencode, so I am not sure what the effect of that would be for claude code. |
|
basically, i think it technically will work if you just have they removed mentions of just having the and in the identity and access management docs: https://code.claude.com/docs/en/iam instead, they push you to turn on "extra usage" in your account settings, which will automagically switch to just charging you per token once your limit on whatever plan you're on runs out, along with warning you that you'll now be paying-as-you-go until your limit refreshes: https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans there are probably some edge cases where its reasonable to use the api key directly, but for essentially everbody its not the "right" thing to do also happy to just remove that line if you dont like it and unset it in my own config ;p |
|
nono, its good. It says best practices. And actually, they can still set it via the wrapper, by default unset is first, followed by env.whatever, although you can target stuff with the DAG too. And you can always mkForce over the whole list. But also, here. I have something direct that helps a bit and doesnt need a new option. replace
with {
name = "ANTHROPIC_API_KEY";
data = "ANTHROPIC_API_KEY";
}directly within the list. Then if people want to run something before via the dag to save the value they can, or they can just mkForce over the whole unsetVars list and fix it themselves, its only 2 items. Otherwise, it looks good to me. I probably should have made that a set type option, but you could technically unset something before and after a runShell, so its a list. |
|
Honestly, now that I am remembering |
|
Thank you for your cooperation on this with the flake thing! |
|
I missed a typo, that was my bad. Also I simplified the main flake.nix Those mpv and jujutsu tests are driving me crazy, that is definitely next on my list, although what is causing it I have no idea. Im going to disable those 2 tests for now. Im done dealing with them on PRs until I can figure out what is wrong with them in actions. |
Adds a claude code wrapper module with the ability to add your MCPs & main claude settings via the wrapper