openrouter prep
This commit is contained in:
parent
047e41747e
commit
575e2db66c
3 changed files with 20 additions and 14 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -573,11 +573,11 @@
|
||||||
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773329386,
|
"lastModified": 1773390002,
|
||||||
"narHash": "sha256-Xoy4j0NKRrZEAkiFxtTKTsmtUumpvjh3ievyat00eA8=",
|
"narHash": "sha256-0RVjh9h0sgPHngxEs/Wd2/xdGsgKgZWjxFu5JsX3ASw=",
|
||||||
"owner": "sodiboo",
|
"owner": "sodiboo",
|
||||||
"repo": "niri-flake",
|
"repo": "niri-flake",
|
||||||
"rev": "815e692569fbb01701770a49ad2fe942cec7f431",
|
"rev": "adc63b19724247f947385381481effd225a6e2fc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
12
flake.nix
12
flake.nix
|
|
@ -171,12 +171,12 @@
|
||||||
group = "wheel";
|
group = "wheel";
|
||||||
mode = "0440";
|
mode = "0440";
|
||||||
};
|
};
|
||||||
# "openrouter-open.key.age" = {
|
"openrouter-open.key.age" = {
|
||||||
# file = ./secrets/openrouter-open.key.age;
|
file = ./secrets/openrouter-open.key.age;
|
||||||
# owner = "root";
|
owner = "root";
|
||||||
# group = "wheel";
|
group = "wheel";
|
||||||
# mode = "0440";
|
mode = "0440";
|
||||||
# };
|
};
|
||||||
};
|
};
|
||||||
identityPaths = [ "/root/.ssh/id_ed25519" ];
|
identityPaths = [ "/root/.ssh/id_ed25519" ];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
16
home.nix
16
home.nix
|
|
@ -116,12 +116,18 @@
|
||||||
OLLAMA_HOST = "127.0.0.1:11434";
|
OLLAMA_HOST = "127.0.0.1:11434";
|
||||||
SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache";
|
SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache";
|
||||||
SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock";
|
SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock";
|
||||||
### openrouter fun
|
|
||||||
OPENROUTER_API_KEY = config.age.secrets."openrouter-open" ;
|
|
||||||
ANTHROPIC_BASE_URL = "https://openrouter.ai/api";
|
|
||||||
ANTHROPIC_AUTH_TOKEN = ${config.home.sessionVariables.OPENROUTER_API_KEY};
|
|
||||||
ANTHROPIC_API_KEY = "";
|
|
||||||
};
|
};
|
||||||
|
sessionVariablesExtra = ''
|
||||||
|
if [ -r /run/agenix/openrouter-open.key.age ]; then
|
||||||
|
export OPENROUTER_API_KEY="$(cat /run/agenix/openrouter-open.key.age)"
|
||||||
|
export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY"
|
||||||
|
|
||||||
|
export \
|
||||||
|
ANTHROPIC_BASE_URL="https://openrouter.ai/api" \
|
||||||
|
ANTHROPIC_API_KEY="" \
|
||||||
|
ANTHROPIC_MODEL="openrouter/free"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
file = {
|
file = {
|
||||||
".config/waybar/power_menu.xml".text = ''
|
".config/waybar/power_menu.xml".text = ''
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue