Skip to content

refactor: generalize nix-eval-flake into nix-flake wrapper#336

Merged
stackptr merged 1 commit intomainfrom
refactor/generalize-nix-flake-wrapper
Mar 9, 2026
Merged

refactor: generalize nix-eval-flake into nix-flake wrapper#336
stackptr merged 1 commit intomainfrom
refactor/generalize-nix-flake-wrapper

Conversation

@stackptr
Copy link
Owner

@stackptr stackptr commented Mar 9, 2026

Summary

  • Replaces the nix-eval-flake wrapper (hardcoded to nix eval) with a generalized nix-flake wrapper that accepts any nix subcommand
  • Updates Claude Code permission rule from nix-eval-flake to nix-flake
  • Avoids the # character in flake refs (e.g., .#nixosConfigurations) causing permission prompts for commands like nix build, nix develop, etc.

Usage: nix-flake <subcommand> <flake-output> [extra-args...]

nix-flake build nixosConfigurations.spore    # → nix build ".#nixosConfigurations.spore"
nix-flake eval nixosConfigurations           # → nix eval ".#nixosConfigurations"
nix-flake develop devShells.x86_64-linux     # → nix develop ".#devShells.x86_64-linux"

Test plan

  • Verify nix-flake eval nixosConfigurations works (replaces nix-eval-flake)
  • Verify nix-flake build nixosConfigurations.glyph.config.system.build.toplevel works
  • Confirm Claude Code allows nix-flake * without permission prompts

🤖 Generated with Claude Code

Replace the nix-eval-flake wrapper (which only supported `nix eval`)
with a generalized nix-flake wrapper that accepts any nix subcommand.
This avoids the `#` character in flake refs causing permission prompts
in Claude Code for commands like `nix build .#...`.

Usage: nix-flake <subcommand> <flake-output> [extra-args...]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stackptr stackptr force-pushed the refactor/generalize-nix-flake-wrapper branch from 47bf6f1 to a987e6b Compare March 9, 2026 19:36
stackptr added a commit to stackptr/llm-profile that referenced this pull request Mar 9, 2026
@stackptr stackptr merged commit 3d39fc8 into main Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant