From 3931df7b0aac811a145351291dbaaf5d5b690133 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 16 Apr 2025 12:26:02 -0500 Subject: [PATCH] feat: fixed claude key --- modules/home/cli/shell/nushell/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/home/cli/shell/nushell/default.nix b/modules/home/cli/shell/nushell/default.nix index aeece39..78b1870 100755 --- a/modules/home/cli/shell/nushell/default.nix +++ b/modules/home/cli/shell/nushell/default.nix @@ -1,6 +1,14 @@ -{ flake, ... }: +{ flake, config, ... }: let + inherit (flake.config.people) user0; + user = config.home.username; + keyLogic = + if user == user0 then + "$env.ANTHROPIC_API_KEY = (open /home/${user0}/.config/zed/claude-api-key)" + else + ""; + in { programs.nushell = { @@ -8,7 +16,7 @@ in configFile.text = '' sleep 7ms $env.config = {show_banner: false} - $env.ANTHROPIC_API_KEY = (open /home/${user0}/.config/zed/claude-api-key) + ${keyLogic} ''; shellAliases = { y = "yy";