Skip to content

Commit e3a83dc

Browse files
stackptrclaude
andcommitted
feat(home): add nix-eval-flake wrapper script
Adds a shell wrapper that evaluates nix flake outputs without using the `#` symbol directly, avoiding Claude Code's shell-quote confirmation prompt. Also adds the command to Claude Code's auto-allow permissions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8947e65 commit e3a83dc

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎modules/home/development.nix‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ in {
5454
"Bash(wc *)"
5555
"Bash(which *)"
5656
"Bash(nix *)"
57+
"Bash(nix-eval-flake *)"
5758
"Bash(git log *)"
5859
"Bash(git diff *)"
5960
"Bash(git status)"

‎modules/home/utilities.nix‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,13 @@ in {
9090
};
9191
programs.nix-index-database.comma.enable = true;
9292

93-
home.packages =
93+
home.packages = let
94+
nix-eval-flake = pkgs.writeShellScriptBin "nix-eval-flake" ''
95+
nix eval ".#$1" "''${@:2}"
96+
'';
97+
in
9498
[
99+
nix-eval-flake
95100
pkgs.manix
96101
pkgs.nix-du
97102
pkgs.nix-tree

0 commit comments

Comments
 (0)