feat: Added sops

This commit is contained in:
uttarayan21
2025-02-14 15:08:48 +05:30
parent a01336a8e0
commit 1b34d6a94b
3 changed files with 23 additions and 7 deletions

View File

@@ -5,8 +5,12 @@
config,
...
}: {
programs.
aichat = {
sops = {
secrets."llama/api_key" = {};
secrets."openai/api_key" = {};
secrets."openrouter/api_key" = {};
};
programs.aichat = {
enable = true;
enableFishIntegration = true;
enableNushellIntegration = false;
@@ -36,6 +40,18 @@
}
];
}
{
type = "openai-compatible";
name = "openrouter";
api_base = "https://openrouter.ai/api/v1";
#api_key_cmd = "cat ${config.sops.secrets."openrouter/api_key".path}";
models = [
{
name = "deepseek/deepseek-r1:free";
type = "chat";
}
];
}
{
type = "openai";
name = "openai";

View File

@@ -11,7 +11,5 @@
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
secrets."llama/api_key" = {};
secrets."openai/api_key" = {};
};
}