mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 23:14:57 +08:00
refactor
This commit is contained in:
parent
cda2b68b7e
commit
adaf77b027
1 changed files with 15 additions and 12 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
{ flake, config, ... }:
|
||||
let
|
||||
inherit (flake) self;
|
||||
inherit (flake.inputs) jumphost-nix agenix;
|
||||
in
|
||||
{
|
||||
|
|
@ -14,16 +15,6 @@ in
|
|||
agenix.homeManagerModules.default
|
||||
];
|
||||
|
||||
age.secrets.juspay-anthropic-api-key.file = ../../../secrets/juspay-anthropic-api-key.age;
|
||||
age.identityPaths = [ "${config.home.homeDirectory}/.ssh/agenix" ];
|
||||
|
||||
programs.zsh.initContent = ''
|
||||
export ANTHROPIC_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
|
||||
'';
|
||||
programs.bash.initExtra = ''
|
||||
export ANTHROPIC_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
|
||||
'';
|
||||
|
||||
# https://github.com/srid/jumphost-nix
|
||||
programs.jumphost = {
|
||||
enable = true;
|
||||
|
|
@ -43,10 +34,22 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# Mirroring configuration from https://github.com/juspay/vertex
|
||||
# For Juspay LiteLLM AI configuration
|
||||
home.sessionVariables = {
|
||||
ANTHROPIC_BASE_URL = "https://grid.ai.juspay.net";
|
||||
ANTHROPIC_MODEL = "claude-sonnet-4-5";
|
||||
# ANTHROPIC_API_KEY set in initExtra via agenix
|
||||
# ANTHROPIC_API_KEY set in initExtra via agenix (see below)
|
||||
};
|
||||
age = {
|
||||
identityPaths = [ "${config.home.homeDirectory}/.ssh/agenix" ];
|
||||
secrets = {
|
||||
juspay-anthropic-api-key.file = self + /secrets/juspay-anthropic-api-key.age;
|
||||
};
|
||||
};
|
||||
programs.zsh.initContent = ''
|
||||
export ANTHROPIC_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
|
||||
'';
|
||||
programs.bash.initExtra = ''
|
||||
export ANTHROPIC_API_KEY="$(cat "${config.age.secrets.juspay-anthropic-api-key.path}")"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue