feat: Use 1password cli insteado of bitwarden cli

This commit is contained in:
uttarayan21
2024-06-21 13:28:25 +05:30
parent 517bedcee6
commit e636659caf
2 changed files with 7 additions and 5 deletions

2
flake.lock generated
View File

@@ -1657,7 +1657,7 @@
},
"locked": {
"lastModified": 1,
"narHash": "sha256-yRBVZzNXmwyU9rHp8pHa2Y2VnyXSGzDHXiriCcF8Uks=",
"narHash": "sha256-DX3q8nvddvoz+RCvQ1EgbqCSguq1BaJi7Af0Zbl5xo0=",
"path": "./neovim",
"type": "path"
},

View File

@@ -396,6 +396,11 @@ in rec {
else if pkgs.stdenv.isDarwin
then "${codelldb}/lldb/lib/liblldb.dylib"
else null;
apikey =
pkgs.writeShellScriptBin
"openapikey" ''
${pkgs._1password}/bin/op item get 'OpenAI API Token' --fields label=credential
'';
in
/*
lua
@@ -488,11 +493,8 @@ in rec {
})
require('chatgpt').setup({
api_key_cmd = "${pkgs._1password}/bin/op item get 'OpenAI API Token' --fields label=credential",
api_key_cmd = "${apikey}/bin/openapikey",
})
-- require("gp").setup({
-- openai_api_key = { "${pkgs.rbw}/bin/rbw", "get", "platform.openai.com" },
-- })
require('octo').setup({
use_local_fs = false,