Reorderd Secrets to match a structure
This commit is contained in:
+6
-6
@@ -43,8 +43,8 @@
|
||||
enableNixpkgsReleaseCheck = false;
|
||||
stateVersion = "26.05";
|
||||
sessionVariables = lib.mkIf (!isDarwin && !isServer) {
|
||||
GROQ_API_KEY = config.sops.secrets.GROQ_API_KEY.path;
|
||||
OPENWEATHER_API_KEY = config.sops.secrets.OPENWEATHER_API_KEY.path;
|
||||
GROQ_API_KEY = config.sops.secrets."api_keys/groq".path;
|
||||
OPENWEATHER_API_KEY = config.sops.secrets."api_keys/openweather".path;
|
||||
};
|
||||
file = lib.mkIf (!isServer) {
|
||||
"Pictures/Avatar" = {
|
||||
@@ -67,13 +67,13 @@
|
||||
else
|
||||
"/persist/secrets/age-key.txt";
|
||||
secrets = {
|
||||
GROQ_API_KEY = { };
|
||||
OPENWEATHER_API_KEY = { };
|
||||
ssh_private_key = {
|
||||
"api_keys/groq" = { };
|
||||
"api_keys/openweather" = { };
|
||||
"ssh/private_key" = {
|
||||
path = if isDarwin then "/Users/${primaryUser}/.ssh/ssh" else "/home/${primaryUser}/.ssh/ssh";
|
||||
mode = "0600";
|
||||
};
|
||||
ssh_github_key = {
|
||||
"ssh/github_key" = {
|
||||
path = if isDarwin then "/Users/${primaryUser}/.ssh/github" else "/home/${primaryUser}/.ssh/github";
|
||||
mode = "0600";
|
||||
};
|
||||
|
||||
@@ -150,11 +150,11 @@
|
||||
format = "{}";
|
||||
return-type = "json";
|
||||
exec = ''
|
||||
curl -sf --max-time 10 "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=$(cat ~/.config/sops-nix/secrets/OPENWEATHER_API_KEY)&units=metric&lang=en" | jq -c '{text: "\(.name) \(.main.temp)C°"}'
|
||||
curl -sf --max-time 10 "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=$(cat ~/.config/sops-nix/secrets/api_keys/openweather)&units=metric&lang=en" | jq -c '{text: "\(.name) \(.main.temp)C°"}'
|
||||
'';
|
||||
interval = 120;
|
||||
on-click = ''
|
||||
data=$(curl -sf --max-time 10 "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=$(cat ~/.config/sops-nix/secrets/OPENWEATHER_API_KEY)&units=metric&lang=en")
|
||||
data=$(curl -sf --max-time 10 "https://api.openweathermap.org/data/2.5/weather?lat=52.281311&lon=10.527029&appid=$(cat ~/.config/sops-nix/secrets/api_keys/openweather)&units=metric&lang=en")
|
||||
city=$(echo "$data" | jq -r '.name')
|
||||
temp=$(echo "$data" | jq -r '.main.temp')
|
||||
feels=$(echo "$data" | jq -r '.main.feels_like')
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
# Avante: AI-powered coding assistant (Cursor-like experience in Neovim)
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
markdown-preview.enable = true;
|
||||
@@ -13,7 +12,7 @@
|
||||
providers = {
|
||||
groq = {
|
||||
__inherited_from = "openai";
|
||||
api_key_name = "cmd:cat /home/phil/.config/sops-nix/secrets/GROQ_API_KEY";
|
||||
api_key_name = "cmd:cat /home/phil/.config/sops-nix/secrets/api_keys/groq";
|
||||
endpoint = "https://api.groq.com/openai/v1/";
|
||||
model = "qwen/qwen3-32b";
|
||||
system_promt = "You are a helpful coding assistant. Always respond in plain markdown format without using tool calls or JSON structures.";
|
||||
@@ -29,9 +28,9 @@
|
||||
|
||||
ollama = {
|
||||
endpoint = "http://10.10.0.2:11434";
|
||||
model = "qwen2.5:3b"; # swap for "llama3.2:3b" or "deepseek-r1:1.5b"
|
||||
timeout = 60000; # local + small model can be slow on first load
|
||||
disable_tools = true; # these small models aren't reliable at tool calling
|
||||
model = "qwen2.5:3b";
|
||||
timeout = 60000;
|
||||
disable_tools = true;
|
||||
is_env_set.__raw = ''require("avante.providers.ollama").check_endpoint_alive'';
|
||||
extra_request_body = {
|
||||
options = {
|
||||
|
||||
Reference in New Issue
Block a user