From 69cb974bc6cc0fb368087c392190a0eed190d30a Mon Sep 17 00:00:00 2001 From: hitsmaxft Date: Sat, 10 Feb 2024 01:18:13 +0800 Subject: [PATCH] Updates for .envrc and flake.nix files configurations --- .envrc | 3 +-- flake.nix | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.envrc b/.envrc index 3ea5866..5000695 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,2 @@ -export API_KEY="$(toml2json ~/.config/gemini-cli.toml |jq -r '.token')" - use flake +export API_KEY="$(toml2json ~/.config/gemini-cli.toml |jq -r '.token')" diff --git a/flake.nix b/flake.nix index a693bb9..d2a6d3c 100644 --- a/flake.nix +++ b/flake.nix @@ -8,10 +8,10 @@ outputs = { self, nixpkgs, utils, naersk }: let systemBuildInputs = system: pkgs: { - ${system} = [ pkgs.iconv pkgs.openssl] ++ - (if pkgs.lib.strings.hasInfix "$system" "darwin" - then [ pkgs.darwin.apple_sdk.frameworks.Security pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ] - else [ ]); + ${system} = with builtins; if ( match ".*darwin" "${system}" != null) + then [ pkgs.iconv pkgs.openssl pkgs.darwin.apple_sdk.frameworks.Security pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ] + else [ pkgs.iconv pkgs.openssl] + ; }; in utils.lib.eachDefaultSystem( system: