feat(aichat): add aichat
This commit is contained in:
parent
e4d77010ea
commit
aa8420c261
3 changed files with 21 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -29,5 +30,16 @@
|
|||
programs.nix-index.enable = true;
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
}
|
||||
{
|
||||
home.shellAliases.ai = "aichat -r %shell% -e";
|
||||
|
||||
home.packages = with pkgs; [ aichat ];
|
||||
|
||||
xdg.configFile."aichat/config.yaml".text = ''
|
||||
model: gemini:gemini-2.0-flash
|
||||
clients:
|
||||
- type: gemini
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
sops = {
|
||||
defaultSopsFile = lib.snowfall.fs.get-file "secrets/secrets.yaml";
|
||||
age.sshKeyPaths = [ "/persist/home/rafiq/.ssh/id_ed25519" ];
|
||||
secrets = {
|
||||
"keys/tailscale" = { };
|
||||
"keys/gemini" = { };
|
||||
"rafiq/hashedPassword".neededForUsers = true;
|
||||
};
|
||||
};
|
||||
environment.shellInit = # sh
|
||||
''
|
||||
export GEMINI_API_KEY=$(sudo cat ${config.sops.secrets."keys/gemini".path})
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue